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

com.zuora.api.PaymentSchedulesApi 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 java.math.BigDecimal;
import com.zuora.model.CancelPaymentSchedule;
import com.zuora.model.CommonErrorResponse;
import com.zuora.model.CommonResponse;
import com.zuora.model.CreatePaymentScheduleItemsRequest;
import com.zuora.model.CreatePaymentScheduleRequest;
import com.zuora.model.CreatePaymentSchedulesRequest;
import com.zuora.model.CreatePaymentSchedulesResponse;
import com.zuora.model.GetPaymentScheduleStatisticResponse;
import com.zuora.model.GetPaymentSchedulesResponse;
import java.time.LocalDate;
import com.zuora.model.PaymentScheduleItemResponse;
import com.zuora.model.PaymentScheduleResponse;
import com.zuora.model.PreviewPaymentSchedule;
import com.zuora.model.ProxyUnauthorizedResponse;
import com.zuora.model.RetryPaymentScheduleItemRequest;
import com.zuora.model.RetryPaymentScheduleItemResponse;
import com.zuora.model.UpdatePaymentScheduleItemRequest;
import com.zuora.model.UpdatePaymentScheduleRequest;

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

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

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

    public PaymentSchedulesApi(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 addItemsToCustomPaymentScheduleCall(String paymentScheduleKey, CreatePaymentScheduleItemsRequest body, String idempotencyKey, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, 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 = body;

        // create path and map variables
        String localVarPath = "/v1/payment-schedules/{paymentScheduleKey}/items"
            .replace("{" + "paymentScheduleKey" + "}", localVarApiClient.escapeString(paymentScheduleKey.toString()));

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

        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 (authorization != null) {
            localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization));
        }

        if (zuoraTrackId != null) {
            localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId));
        }

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

        if (zuoraVersion != null) {
            localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion));
        }

        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 addItemsToCustomPaymentScheduleValidateBeforeCall(String paymentScheduleKey, CreatePaymentScheduleItemsRequest body, String idempotencyKey, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'paymentScheduleKey' is set
        if (paymentScheduleKey == null) {
            throw new ApiException("Missing the required parameter 'paymentScheduleKey' when calling addItemsToCustomPaymentSchedule(Async)");
        }

        // verify the required parameter 'body' is set
        if (body == null) {
            throw new ApiException("Missing the required parameter 'body' when calling addItemsToCustomPaymentSchedule(Async)");
        }

        return addItemsToCustomPaymentScheduleCall(paymentScheduleKey, body, idempotencyKey, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback);

    }

            /**
            * Add payment schedule items to a custom payment schedule
            * Adds payment schedule items to a custom payment schedule. You cannot use this operation to add payment schedule items to recurring payment schedules.  **Note:** - The Payment Schedules feature is in the **Early Adopter** phase. We are actively soliciting feedback from a small set of early adopters before releasing it as generally available. To manage and access this feature through the self-service interface, see [Manage Features](https://knowledgecenter.zuora.com/Zuora_Payments/Payments_Settings/Manage_Features) in the Knowledge Center. - This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. 
                * @param paymentScheduleKey The unique ID or number of a payment schedule. For example, `8a90857b822459cd018224dcb9eb13be`, or `PS-00000007`.  (required)
                * @param body  (required)
                * @param idempotencyKey Specify a unique idempotency key if you want to perform an idempotent POST or PATCH request. Do not use this header in other request types.   With this header specified, the Zuora server can identify subsequent retries of the same request using this value, which prevents the same operation from being performed multiple times by accident.   (optional)
                * @param acceptEncoding Include the `Accept-Encoding: gzip` header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response.   If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a `Content-Encoding` header with the compression algorithm so that your client can decompress it.  (optional)
                * @param contentEncoding Include the `Content-Encoding: gzip` header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload.  (optional)
                * @param authorization The value is in the `Bearer {token}` format where {token} is a valid OAuth token generated by calling [Create an OAuth token](https://www.zuora.com/developer/api-references/api/operation/createToken).  (optional)
                * @param zuoraTrackId A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue.  The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (`:`), semicolon (`;`), double quote (`\"`), and quote (`'`).  (optional)
                * @param zuoraEntityIds An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header.  (optional)
                * @param zuoraVersion The minor version of the Zuora REST API.   (optional, default to 2024-05-20)
                * @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 PaymentScheduleResponse
            * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ protected PaymentScheduleResponse addItemsToCustomPaymentSchedule(String paymentScheduleKey, CreatePaymentScheduleItemsRequest body, String idempotencyKey, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds) throws ApiException { ApiResponse localVarResp = addItemsToCustomPaymentScheduleWithHttpInfo(paymentScheduleKey, body, idempotencyKey, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds); return localVarResp.getData(); } private ApiResponse addItemsToCustomPaymentScheduleWithHttpInfo(String paymentScheduleKey, CreatePaymentScheduleItemsRequest body, String idempotencyKey, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds) throws ApiException { okhttp3.Call localVarCall = addItemsToCustomPaymentScheduleValidateBeforeCall(paymentScheduleKey, body, idempotencyKey, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call addItemsToCustomPaymentScheduleAsync(String paymentScheduleKey, CreatePaymentScheduleItemsRequest body, String idempotencyKey, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = addItemsToCustomPaymentScheduleValidateBeforeCall(paymentScheduleKey, body, idempotencyKey, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class AddItemsToCustomPaymentScheduleApi { private final String paymentScheduleKey; private final CreatePaymentScheduleItemsRequest body; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String authorization; private String zuoraTrackId; private String zuoraEntityIds; private String zuoraVersion; private String zuoraOrgIds; private AddItemsToCustomPaymentScheduleApi(String paymentScheduleKey, CreatePaymentScheduleItemsRequest body) { this.paymentScheduleKey = paymentScheduleKey; this.body = body; } /** * Set idempotencyKey * @param idempotencyKey Specify a unique idempotency key if you want to perform an idempotent POST or PATCH request. Do not use this header in other request types. With this header specified, the Zuora server can identify subsequent retries of the same request using this value, which prevents the same operation from being performed multiple times by accident. (optional) * @return AddItemsToCustomPaymentScheduleApi */ public AddItemsToCustomPaymentScheduleApi idempotencyKey(String idempotencyKey) { this.idempotencyKey = idempotencyKey; return this; } /** * Set acceptEncoding * @param acceptEncoding Include the `Accept-Encoding: gzip` header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a `Content-Encoding` header with the compression algorithm so that your client can decompress it. (optional) * @return AddItemsToCustomPaymentScheduleApi */ public AddItemsToCustomPaymentScheduleApi acceptEncoding(String acceptEncoding) { this.acceptEncoding = acceptEncoding; return this; } /** * Set contentEncoding * @param contentEncoding Include the `Content-Encoding: gzip` header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload. (optional) * @return AddItemsToCustomPaymentScheduleApi */ public AddItemsToCustomPaymentScheduleApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; return this; } /** * Set authorization * @param authorization The value is in the `Bearer {token}` format where {token} is a valid OAuth token generated by calling [Create an OAuth token](https://www.zuora.com/developer/api-references/api/operation/createToken). (optional) * @return AddItemsToCustomPaymentScheduleApi */ public AddItemsToCustomPaymentScheduleApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraTrackId * @param zuoraTrackId A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (`:`), semicolon (`;`), double quote (`\"`), and quote (`'`). (optional) * @return AddItemsToCustomPaymentScheduleApi */ public AddItemsToCustomPaymentScheduleApi zuoraTrackId(String zuoraTrackId) { this.zuoraTrackId = zuoraTrackId; return this; } /** * Set zuoraEntityIds * @param zuoraEntityIds An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. (optional) * @return AddItemsToCustomPaymentScheduleApi */ public AddItemsToCustomPaymentScheduleApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return AddItemsToCustomPaymentScheduleApi */ public AddItemsToCustomPaymentScheduleApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * 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 AddItemsToCustomPaymentScheduleApi */ public AddItemsToCustomPaymentScheduleApi zuoraOrgIds(String zuoraOrgIds) { this.zuoraOrgIds = zuoraOrgIds; return this; } /** * Build call for addItemsToCustomPaymentSchedule * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return addItemsToCustomPaymentScheduleCall(paymentScheduleKey, body, idempotencyKey, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); } /** * Execute addItemsToCustomPaymentSchedule request * @return PaymentScheduleResponse * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public PaymentScheduleResponse execute() throws ApiException { ApiResponse localVarResp = addItemsToCustomPaymentScheduleWithHttpInfo(paymentScheduleKey, body, idempotencyKey, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds); return localVarResp.getData(); } /** * Execute addItemsToCustomPaymentSchedule request with HTTP info returned * @return ApiResponse<PaymentScheduleResponse> * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ private ApiResponse executeWithHttpInfo() throws ApiException { return addItemsToCustomPaymentScheduleWithHttpInfo(paymentScheduleKey, body, idempotencyKey, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds); } /** * Execute addItemsToCustomPaymentSchedule 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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return addItemsToCustomPaymentScheduleAsync(paymentScheduleKey, body, idempotencyKey, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); } } /** * Add payment schedule items to a custom payment schedule * Adds payment schedule items to a custom payment schedule. You cannot use this operation to add payment schedule items to recurring payment schedules. **Note:** - The Payment Schedules feature is in the **Early Adopter** phase. We are actively soliciting feedback from a small set of early adopters before releasing it as generally available. To manage and access this feature through the self-service interface, see [Manage Features](https://knowledgecenter.zuora.com/Zuora_Payments/Payments_Settings/Manage_Features) in the Knowledge Center. - This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. * @param paymentScheduleKey The unique ID or number of a payment schedule. For example, `8a90857b822459cd018224dcb9eb13be`, or `PS-00000007`. (required) * @param body (required) * @return AddItemsToCustomPaymentScheduleApi */ public AddItemsToCustomPaymentScheduleApi addItemsToCustomPaymentScheduleApi(String paymentScheduleKey, CreatePaymentScheduleItemsRequest body) { return new AddItemsToCustomPaymentScheduleApi(paymentScheduleKey, body); } private okhttp3.Call cancelPaymentScheduleCall(String paymentScheduleKey, CancelPaymentSchedule body, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, 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 = body; // create path and map variables String localVarPath = "/v1/payment-schedules/{paymentScheduleKey}/cancel" .replace("{" + "paymentScheduleKey" + "}", localVarApiClient.escapeString(paymentScheduleKey.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (acceptEncoding != null) { localVarHeaderParams.put("Accept-Encoding", localVarApiClient.parameterToString(acceptEncoding)); } if (contentEncoding != null) { localVarHeaderParams.put("Content-Encoding", localVarApiClient.parameterToString(contentEncoding)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 cancelPaymentScheduleValidateBeforeCall(String paymentScheduleKey, CancelPaymentSchedule body, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { // verify the required parameter 'paymentScheduleKey' is set if (paymentScheduleKey == null) { throw new ApiException("Missing the required parameter 'paymentScheduleKey' when calling cancelPaymentSchedule(Async)"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling cancelPaymentSchedule(Async)"); } return cancelPaymentScheduleCall(paymentScheduleKey, body, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); } /** * Cancel a payment schedule * Cancels a payment schedule. **Note:** - All pending payment schedule items will be canceled, effective from `cancelDate`. - The Payment Schedules feature is in the **Early Adopter** phase. We are actively soliciting feedback from a small set of early adopters before releasing it as generally available. To manage and access this feature through the self-service interface, see [Manage Features](https://knowledgecenter.zuora.com/Zuora_Payments/Payments_Settings/Manage_Features) in the Knowledge Center. - This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. * @param paymentScheduleKey The unique ID or number of a payment schedule. For example, `8a90857b822459cd018224dcb9eb13be`, or `PS-00000007`. (required) * @param body (required) * @param acceptEncoding Include the `Accept-Encoding: gzip` header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a `Content-Encoding` header with the compression algorithm so that your client can decompress it. (optional) * @param contentEncoding Include the `Content-Encoding: gzip` header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload. (optional) * @param authorization The value is in the `Bearer {token}` format where {token} is a valid OAuth token generated by calling [Create an OAuth token](https://www.zuora.com/developer/api-references/api/operation/createToken). (optional) * @param zuoraTrackId A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (`:`), semicolon (`;`), double quote (`\"`), and quote (`'`). (optional) * @param zuoraEntityIds An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. (optional) * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @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 PaymentScheduleResponse * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ protected PaymentScheduleResponse cancelPaymentSchedule(String paymentScheduleKey, CancelPaymentSchedule body, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds) throws ApiException { ApiResponse localVarResp = cancelPaymentScheduleWithHttpInfo(paymentScheduleKey, body, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds); return localVarResp.getData(); } private ApiResponse cancelPaymentScheduleWithHttpInfo(String paymentScheduleKey, CancelPaymentSchedule body, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds) throws ApiException { okhttp3.Call localVarCall = cancelPaymentScheduleValidateBeforeCall(paymentScheduleKey, body, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call cancelPaymentScheduleAsync(String paymentScheduleKey, CancelPaymentSchedule body, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = cancelPaymentScheduleValidateBeforeCall(paymentScheduleKey, body, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class CancelPaymentScheduleApi { private final String paymentScheduleKey; private final CancelPaymentSchedule body; private String acceptEncoding; private String contentEncoding; private String authorization; private String zuoraTrackId; private String zuoraEntityIds; private String zuoraVersion; private String zuoraOrgIds; private CancelPaymentScheduleApi(String paymentScheduleKey, CancelPaymentSchedule body) { this.paymentScheduleKey = paymentScheduleKey; this.body = body; } /** * Set acceptEncoding * @param acceptEncoding Include the `Accept-Encoding: gzip` header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a `Content-Encoding` header with the compression algorithm so that your client can decompress it. (optional) * @return CancelPaymentScheduleApi */ public CancelPaymentScheduleApi acceptEncoding(String acceptEncoding) { this.acceptEncoding = acceptEncoding; return this; } /** * Set contentEncoding * @param contentEncoding Include the `Content-Encoding: gzip` header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload. (optional) * @return CancelPaymentScheduleApi */ public CancelPaymentScheduleApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; return this; } /** * Set authorization * @param authorization The value is in the `Bearer {token}` format where {token} is a valid OAuth token generated by calling [Create an OAuth token](https://www.zuora.com/developer/api-references/api/operation/createToken). (optional) * @return CancelPaymentScheduleApi */ public CancelPaymentScheduleApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraTrackId * @param zuoraTrackId A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (`:`), semicolon (`;`), double quote (`\"`), and quote (`'`). (optional) * @return CancelPaymentScheduleApi */ public CancelPaymentScheduleApi zuoraTrackId(String zuoraTrackId) { this.zuoraTrackId = zuoraTrackId; return this; } /** * Set zuoraEntityIds * @param zuoraEntityIds An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. (optional) * @return CancelPaymentScheduleApi */ public CancelPaymentScheduleApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return CancelPaymentScheduleApi */ public CancelPaymentScheduleApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * 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 CancelPaymentScheduleApi */ public CancelPaymentScheduleApi zuoraOrgIds(String zuoraOrgIds) { this.zuoraOrgIds = zuoraOrgIds; return this; } /** * Build call for cancelPaymentSchedule * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return cancelPaymentScheduleCall(paymentScheduleKey, body, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); } /** * Execute cancelPaymentSchedule request * @return PaymentScheduleResponse * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public PaymentScheduleResponse execute() throws ApiException { ApiResponse localVarResp = cancelPaymentScheduleWithHttpInfo(paymentScheduleKey, body, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds); return localVarResp.getData(); } /** * Execute cancelPaymentSchedule request with HTTP info returned * @return ApiResponse<PaymentScheduleResponse> * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ private ApiResponse executeWithHttpInfo() throws ApiException { return cancelPaymentScheduleWithHttpInfo(paymentScheduleKey, body, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds); } /** * Execute cancelPaymentSchedule 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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return cancelPaymentScheduleAsync(paymentScheduleKey, body, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); } } /** * Cancel a payment schedule * Cancels a payment schedule. **Note:** - All pending payment schedule items will be canceled, effective from `cancelDate`. - The Payment Schedules feature is in the **Early Adopter** phase. We are actively soliciting feedback from a small set of early adopters before releasing it as generally available. To manage and access this feature through the self-service interface, see [Manage Features](https://knowledgecenter.zuora.com/Zuora_Payments/Payments_Settings/Manage_Features) in the Knowledge Center. - This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. * @param paymentScheduleKey The unique ID or number of a payment schedule. For example, `8a90857b822459cd018224dcb9eb13be`, or `PS-00000007`. (required) * @param body (required) * @return CancelPaymentScheduleApi */ public CancelPaymentScheduleApi cancelPaymentScheduleApi(String paymentScheduleKey, CancelPaymentSchedule body) { return new CancelPaymentScheduleApi(paymentScheduleKey, body); } private okhttp3.Call cancelPaymentScheduleItemCall(String itemId, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, 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/payment-schedule-items/{item-id}/cancel" .replace("{" + "item-id" + "}", localVarApiClient.escapeString(itemId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (acceptEncoding != null) { localVarHeaderParams.put("Accept-Encoding", localVarApiClient.parameterToString(acceptEncoding)); } if (contentEncoding != null) { localVarHeaderParams.put("Content-Encoding", localVarApiClient.parameterToString(contentEncoding)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call cancelPaymentScheduleItemValidateBeforeCall(String itemId, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { // verify the required parameter 'itemId' is set if (itemId == null) { throw new ApiException("Missing the required parameter 'itemId' when calling cancelPaymentScheduleItem(Async)"); } return cancelPaymentScheduleItemCall(itemId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); } /** * Cancel a payment schedule item * Cancels a payment schedule item by ID. **Note:** - The Payment Schedules feature is in the **Early Adopter** phase. We are actively soliciting feedback from a small set of early adopters before releasing it as generally available. To manage and access this feature through the self-service interface, see [Manage Features](https://knowledgecenter.zuora.com/Zuora_Payments/Payments_Settings/Manage_Features) in the Knowledge Center. - This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. * @param itemId The unique ID of a payment schedule item. (required) * @param acceptEncoding Include the `Accept-Encoding: gzip` header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a `Content-Encoding` header with the compression algorithm so that your client can decompress it. (optional) * @param contentEncoding Include the `Content-Encoding: gzip` header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload. (optional) * @param authorization The value is in the `Bearer {token}` format where {token} is a valid OAuth token generated by calling [Create an OAuth token](https://www.zuora.com/developer/api-references/api/operation/createToken). (optional) * @param zuoraTrackId A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (`:`), semicolon (`;`), double quote (`\"`), and quote (`'`). (optional) * @param zuoraEntityIds An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. (optional) * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @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 PaymentScheduleItemResponse * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ protected PaymentScheduleItemResponse cancelPaymentScheduleItem(String itemId, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds) throws ApiException { ApiResponse localVarResp = cancelPaymentScheduleItemWithHttpInfo(itemId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds); return localVarResp.getData(); } private ApiResponse cancelPaymentScheduleItemWithHttpInfo(String itemId, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds) throws ApiException { okhttp3.Call localVarCall = cancelPaymentScheduleItemValidateBeforeCall(itemId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call cancelPaymentScheduleItemAsync(String itemId, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = cancelPaymentScheduleItemValidateBeforeCall(itemId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class CancelPaymentScheduleItemApi { private final String itemId; private String acceptEncoding; private String contentEncoding; private String authorization; private String zuoraTrackId; private String zuoraEntityIds; private String zuoraVersion; private String zuoraOrgIds; private CancelPaymentScheduleItemApi(String itemId) { this.itemId = itemId; } /** * Set acceptEncoding * @param acceptEncoding Include the `Accept-Encoding: gzip` header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a `Content-Encoding` header with the compression algorithm so that your client can decompress it. (optional) * @return CancelPaymentScheduleItemApi */ public CancelPaymentScheduleItemApi acceptEncoding(String acceptEncoding) { this.acceptEncoding = acceptEncoding; return this; } /** * Set contentEncoding * @param contentEncoding Include the `Content-Encoding: gzip` header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload. (optional) * @return CancelPaymentScheduleItemApi */ public CancelPaymentScheduleItemApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; return this; } /** * Set authorization * @param authorization The value is in the `Bearer {token}` format where {token} is a valid OAuth token generated by calling [Create an OAuth token](https://www.zuora.com/developer/api-references/api/operation/createToken). (optional) * @return CancelPaymentScheduleItemApi */ public CancelPaymentScheduleItemApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraTrackId * @param zuoraTrackId A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (`:`), semicolon (`;`), double quote (`\"`), and quote (`'`). (optional) * @return CancelPaymentScheduleItemApi */ public CancelPaymentScheduleItemApi zuoraTrackId(String zuoraTrackId) { this.zuoraTrackId = zuoraTrackId; return this; } /** * Set zuoraEntityIds * @param zuoraEntityIds An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. (optional) * @return CancelPaymentScheduleItemApi */ public CancelPaymentScheduleItemApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return CancelPaymentScheduleItemApi */ public CancelPaymentScheduleItemApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * 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 CancelPaymentScheduleItemApi */ public CancelPaymentScheduleItemApi zuoraOrgIds(String zuoraOrgIds) { this.zuoraOrgIds = zuoraOrgIds; return this; } /** * Build call for cancelPaymentScheduleItem * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return cancelPaymentScheduleItemCall(itemId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); } /** * Execute cancelPaymentScheduleItem request * @return PaymentScheduleItemResponse * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public PaymentScheduleItemResponse execute() throws ApiException { ApiResponse localVarResp = cancelPaymentScheduleItemWithHttpInfo(itemId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds); return localVarResp.getData(); } /** * Execute cancelPaymentScheduleItem request with HTTP info returned * @return ApiResponse<PaymentScheduleItemResponse> * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ private ApiResponse executeWithHttpInfo() throws ApiException { return cancelPaymentScheduleItemWithHttpInfo(itemId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds); } /** * Execute cancelPaymentScheduleItem 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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return cancelPaymentScheduleItemAsync(itemId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); } } /** * Cancel a payment schedule item * Cancels a payment schedule item by ID. **Note:** - The Payment Schedules feature is in the **Early Adopter** phase. We are actively soliciting feedback from a small set of early adopters before releasing it as generally available. To manage and access this feature through the self-service interface, see [Manage Features](https://knowledgecenter.zuora.com/Zuora_Payments/Payments_Settings/Manage_Features) in the Knowledge Center. - This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. * @param itemId The unique ID of a payment schedule item. (required) * @return CancelPaymentScheduleItemApi */ public CancelPaymentScheduleItemApi cancelPaymentScheduleItemApi(String itemId) { return new CancelPaymentScheduleItemApi(itemId); } private okhttp3.Call createPaymentScheduleCall(CreatePaymentScheduleRequest body, String idempotencyKey, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, 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 = body; // create path and map variables String localVarPath = "/v1/payment-schedules"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); 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 (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 createPaymentScheduleValidateBeforeCall(CreatePaymentScheduleRequest body, String idempotencyKey, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling createPaymentSchedule(Async)"); } return createPaymentScheduleCall(body, idempotencyKey, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); } /** * Create a payment schedule * Creates a payment schedule. You can create either recurring payment schedules or custom payment schedules. **Note:** - This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. - You can choose to use payment schedules to process payments associated with billing documents or unapplied payments. If Standalone Payment is enabled, you can also use payment schedules to process standalone payments. - This operation is version controlled. If you set `zuora-version` to `329.0`, when creating custom payment schedules associated with billing documents, you need to specify the billing document for each payment schedule item; If `zuora-version` is set to `330.0`, when creating custom payment schedules associated with billing documents, you only need to specify the billing documents at the payment schedule level. The default version number is `329.0`. However, we recommend that you specify the version to `330.0`. `329.0` will be deprecated soon. * @param body (required) * @param idempotencyKey Specify a unique idempotency key if you want to perform an idempotent POST or PATCH request. Do not use this header in other request types. With this header specified, the Zuora server can identify subsequent retries of the same request using this value, which prevents the same operation from being performed multiple times by accident. (optional) * @param acceptEncoding Include the `Accept-Encoding: gzip` header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a `Content-Encoding` header with the compression algorithm so that your client can decompress it. (optional) * @param contentEncoding Include the `Content-Encoding: gzip` header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload. (optional) * @param authorization The value is in the `Bearer {token}` format where {token} is a valid OAuth token generated by calling [Create an OAuth token](https://www.zuora.com/developer/api-references/api/operation/createToken). (optional) * @param zuoraTrackId A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (`:`), semicolon (`;`), double quote (`\"`), and quote (`'`). (optional) * @param zuoraEntityIds An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. (optional) * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @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 PaymentScheduleResponse * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ protected PaymentScheduleResponse createPaymentSchedule(CreatePaymentScheduleRequest body, String idempotencyKey, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds) throws ApiException { ApiResponse localVarResp = createPaymentScheduleWithHttpInfo(body, idempotencyKey, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds); return localVarResp.getData(); } private ApiResponse createPaymentScheduleWithHttpInfo(CreatePaymentScheduleRequest body, String idempotencyKey, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds) throws ApiException { okhttp3.Call localVarCall = createPaymentScheduleValidateBeforeCall(body, idempotencyKey, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call createPaymentScheduleAsync(CreatePaymentScheduleRequest body, String idempotencyKey, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createPaymentScheduleValidateBeforeCall(body, idempotencyKey, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class CreatePaymentScheduleApi { private final CreatePaymentScheduleRequest body; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String authorization; private String zuoraTrackId; private String zuoraEntityIds; private String zuoraVersion; private String zuoraOrgIds; private CreatePaymentScheduleApi(CreatePaymentScheduleRequest body) { this.body = body; } /** * Set idempotencyKey * @param idempotencyKey Specify a unique idempotency key if you want to perform an idempotent POST or PATCH request. Do not use this header in other request types. With this header specified, the Zuora server can identify subsequent retries of the same request using this value, which prevents the same operation from being performed multiple times by accident. (optional) * @return CreatePaymentScheduleApi */ public CreatePaymentScheduleApi idempotencyKey(String idempotencyKey) { this.idempotencyKey = idempotencyKey; return this; } /** * Set acceptEncoding * @param acceptEncoding Include the `Accept-Encoding: gzip` header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a `Content-Encoding` header with the compression algorithm so that your client can decompress it. (optional) * @return CreatePaymentScheduleApi */ public CreatePaymentScheduleApi acceptEncoding(String acceptEncoding) { this.acceptEncoding = acceptEncoding; return this; } /** * Set contentEncoding * @param contentEncoding Include the `Content-Encoding: gzip` header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload. (optional) * @return CreatePaymentScheduleApi */ public CreatePaymentScheduleApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; return this; } /** * Set authorization * @param authorization The value is in the `Bearer {token}` format where {token} is a valid OAuth token generated by calling [Create an OAuth token](https://www.zuora.com/developer/api-references/api/operation/createToken). (optional) * @return CreatePaymentScheduleApi */ public CreatePaymentScheduleApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraTrackId * @param zuoraTrackId A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (`:`), semicolon (`;`), double quote (`\"`), and quote (`'`). (optional) * @return CreatePaymentScheduleApi */ public CreatePaymentScheduleApi zuoraTrackId(String zuoraTrackId) { this.zuoraTrackId = zuoraTrackId; return this; } /** * Set zuoraEntityIds * @param zuoraEntityIds An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. (optional) * @return CreatePaymentScheduleApi */ public CreatePaymentScheduleApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return CreatePaymentScheduleApi */ public CreatePaymentScheduleApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * 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 CreatePaymentScheduleApi */ public CreatePaymentScheduleApi zuoraOrgIds(String zuoraOrgIds) { this.zuoraOrgIds = zuoraOrgIds; return this; } /** * Build call for createPaymentSchedule * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return createPaymentScheduleCall(body, idempotencyKey, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); } /** * Execute createPaymentSchedule request * @return PaymentScheduleResponse * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public PaymentScheduleResponse execute() throws ApiException { ApiResponse localVarResp = createPaymentScheduleWithHttpInfo(body, idempotencyKey, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds); return localVarResp.getData(); } /** * Execute createPaymentSchedule request with HTTP info returned * @return ApiResponse<PaymentScheduleResponse> * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ private ApiResponse executeWithHttpInfo() throws ApiException { return createPaymentScheduleWithHttpInfo(body, idempotencyKey, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds); } /** * Execute createPaymentSchedule 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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return createPaymentScheduleAsync(body, idempotencyKey, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); } } /** * Create a payment schedule * Creates a payment schedule. You can create either recurring payment schedules or custom payment schedules. **Note:** - This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. - You can choose to use payment schedules to process payments associated with billing documents or unapplied payments. If Standalone Payment is enabled, you can also use payment schedules to process standalone payments. - This operation is version controlled. If you set `zuora-version` to `329.0`, when creating custom payment schedules associated with billing documents, you need to specify the billing document for each payment schedule item; If `zuora-version` is set to `330.0`, when creating custom payment schedules associated with billing documents, you only need to specify the billing documents at the payment schedule level. The default version number is `329.0`. However, we recommend that you specify the version to `330.0`. `329.0` will be deprecated soon. * @param body (required) * @return CreatePaymentScheduleApi */ public CreatePaymentScheduleApi createPaymentScheduleApi(CreatePaymentScheduleRequest body) { return new CreatePaymentScheduleApi(body); } private okhttp3.Call createPaymentSchedulesCall(CreatePaymentSchedulesRequest body, String idempotencyKey, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, 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 = body; // create path and map variables String localVarPath = "/v1/payment-schedules/batch"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); 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 (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 createPaymentSchedulesValidateBeforeCall(CreatePaymentSchedulesRequest body, String idempotencyKey, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling createPaymentSchedules(Async)"); } return createPaymentSchedulesCall(body, idempotencyKey, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); } /** * Create multiple payment schedules at once * Creates multiple payment schedules at once. You can create both recurring payment schedules and custom payment schedules in one request. The maximum number of payment schedules that can be created by a single request is 50. The maximum number of payment schedule items that each payment schedule can contain is 1000, i.e., you must specify less than 1000 items for a custom payment schedule, and the `occurrences` field must be less than 1000 for a recurring payment schedule. **Note:** - The Payment Schedules feature is in the **Early Adopter** phase. We are actively soliciting feedback from a small set of early adopters before releasing it as generally available. To manage and access this feature through the self-service interface, see [Manage Features](https://knowledgecenter.zuora.com/Zuora_Payments/Payments_Settings/Manage_Features) in the Knowledge Center. - This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. - If Standalone Payment is enabled, you can choose to use payment schedules to process payments associated with billing documents, standalone payments, or unapplied payments. If Standalone Payment is not enabled, you can only use payment schedules to process unapplied payments or payments associated with billing documents. - This operation is version controlled. If you set `zuora-version` to `329.0`, when creating custom payment schedules associated with billing documents, you need to specify the billing document for each payment schedule item; If `zuora-version` is set to `330.0`, when creating custom payment schedules associated with billing documents, you only need to specify the billing documents at the payment schedule level. The default version number is `329.0`. However, we recommend that you specify the version to `330.0`. `329.0` will be deprecated soon. * @param body (required) * @param idempotencyKey Specify a unique idempotency key if you want to perform an idempotent POST or PATCH request. Do not use this header in other request types. With this header specified, the Zuora server can identify subsequent retries of the same request using this value, which prevents the same operation from being performed multiple times by accident. (optional) * @param acceptEncoding Include the `Accept-Encoding: gzip` header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a `Content-Encoding` header with the compression algorithm so that your client can decompress it. (optional) * @param contentEncoding Include the `Content-Encoding: gzip` header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload. (optional) * @param authorization The value is in the `Bearer {token}` format where {token} is a valid OAuth token generated by calling [Create an OAuth token](https://www.zuora.com/developer/api-references/api/operation/createToken). (optional) * @param zuoraTrackId A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (`:`), semicolon (`;`), double quote (`\"`), and quote (`'`). (optional) * @param zuoraEntityIds An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. (optional) * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @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 CreatePaymentSchedulesResponse * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ protected CreatePaymentSchedulesResponse createPaymentSchedules(CreatePaymentSchedulesRequest body, String idempotencyKey, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds) throws ApiException { ApiResponse localVarResp = createPaymentSchedulesWithHttpInfo(body, idempotencyKey, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds); return localVarResp.getData(); } private ApiResponse createPaymentSchedulesWithHttpInfo(CreatePaymentSchedulesRequest body, String idempotencyKey, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds) throws ApiException { okhttp3.Call localVarCall = createPaymentSchedulesValidateBeforeCall(body, idempotencyKey, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call createPaymentSchedulesAsync(CreatePaymentSchedulesRequest body, String idempotencyKey, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createPaymentSchedulesValidateBeforeCall(body, idempotencyKey, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class CreatePaymentSchedulesApi { private final CreatePaymentSchedulesRequest body; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String authorization; private String zuoraTrackId; private String zuoraEntityIds; private String zuoraVersion; private String zuoraOrgIds; private CreatePaymentSchedulesApi(CreatePaymentSchedulesRequest body) { this.body = body; } /** * Set idempotencyKey * @param idempotencyKey Specify a unique idempotency key if you want to perform an idempotent POST or PATCH request. Do not use this header in other request types. With this header specified, the Zuora server can identify subsequent retries of the same request using this value, which prevents the same operation from being performed multiple times by accident. (optional) * @return CreatePaymentSchedulesApi */ public CreatePaymentSchedulesApi idempotencyKey(String idempotencyKey) { this.idempotencyKey = idempotencyKey; return this; } /** * Set acceptEncoding * @param acceptEncoding Include the `Accept-Encoding: gzip` header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a `Content-Encoding` header with the compression algorithm so that your client can decompress it. (optional) * @return CreatePaymentSchedulesApi */ public CreatePaymentSchedulesApi acceptEncoding(String acceptEncoding) { this.acceptEncoding = acceptEncoding; return this; } /** * Set contentEncoding * @param contentEncoding Include the `Content-Encoding: gzip` header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload. (optional) * @return CreatePaymentSchedulesApi */ public CreatePaymentSchedulesApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; return this; } /** * Set authorization * @param authorization The value is in the `Bearer {token}` format where {token} is a valid OAuth token generated by calling [Create an OAuth token](https://www.zuora.com/developer/api-references/api/operation/createToken). (optional) * @return CreatePaymentSchedulesApi */ public CreatePaymentSchedulesApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraTrackId * @param zuoraTrackId A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (`:`), semicolon (`;`), double quote (`\"`), and quote (`'`). (optional) * @return CreatePaymentSchedulesApi */ public CreatePaymentSchedulesApi zuoraTrackId(String zuoraTrackId) { this.zuoraTrackId = zuoraTrackId; return this; } /** * Set zuoraEntityIds * @param zuoraEntityIds An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. (optional) * @return CreatePaymentSchedulesApi */ public CreatePaymentSchedulesApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return CreatePaymentSchedulesApi */ public CreatePaymentSchedulesApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * 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 CreatePaymentSchedulesApi */ public CreatePaymentSchedulesApi zuoraOrgIds(String zuoraOrgIds) { this.zuoraOrgIds = zuoraOrgIds; return this; } /** * Build call for createPaymentSchedules * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return createPaymentSchedulesCall(body, idempotencyKey, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); } /** * Execute createPaymentSchedules request * @return CreatePaymentSchedulesResponse * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public CreatePaymentSchedulesResponse execute() throws ApiException { ApiResponse localVarResp = createPaymentSchedulesWithHttpInfo(body, idempotencyKey, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds); return localVarResp.getData(); } /** * Execute createPaymentSchedules request with HTTP info returned * @return ApiResponse<CreatePaymentSchedulesResponse> * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ private ApiResponse executeWithHttpInfo() throws ApiException { return createPaymentSchedulesWithHttpInfo(body, idempotencyKey, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds); } /** * Execute createPaymentSchedules 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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return createPaymentSchedulesAsync(body, idempotencyKey, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); } } /** * Create multiple payment schedules at once * Creates multiple payment schedules at once. You can create both recurring payment schedules and custom payment schedules in one request. The maximum number of payment schedules that can be created by a single request is 50. The maximum number of payment schedule items that each payment schedule can contain is 1000, i.e., you must specify less than 1000 items for a custom payment schedule, and the `occurrences` field must be less than 1000 for a recurring payment schedule. **Note:** - The Payment Schedules feature is in the **Early Adopter** phase. We are actively soliciting feedback from a small set of early adopters before releasing it as generally available. To manage and access this feature through the self-service interface, see [Manage Features](https://knowledgecenter.zuora.com/Zuora_Payments/Payments_Settings/Manage_Features) in the Knowledge Center. - This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. - If Standalone Payment is enabled, you can choose to use payment schedules to process payments associated with billing documents, standalone payments, or unapplied payments. If Standalone Payment is not enabled, you can only use payment schedules to process unapplied payments or payments associated with billing documents. - This operation is version controlled. If you set `zuora-version` to `329.0`, when creating custom payment schedules associated with billing documents, you need to specify the billing document for each payment schedule item; If `zuora-version` is set to `330.0`, when creating custom payment schedules associated with billing documents, you only need to specify the billing documents at the payment schedule level. The default version number is `329.0`. However, we recommend that you specify the version to `330.0`. `329.0` will be deprecated soon. * @param body (required) * @return CreatePaymentSchedulesApi */ public CreatePaymentSchedulesApi createPaymentSchedulesApi(CreatePaymentSchedulesRequest body) { return new CreatePaymentSchedulesApi(body); } private okhttp3.Call getPaymentScheduleCall(String paymentScheduleKey, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, Integer nextPendingItems, Integer lastProcessedItems, String zuoraVersion, 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/payment-schedules/{paymentScheduleKey}" .replace("{" + "paymentScheduleKey" + "}", localVarApiClient.escapeString(paymentScheduleKey.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (nextPendingItems != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("nextPendingItems", nextPendingItems)); } if (lastProcessedItems != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("lastProcessedItems", lastProcessedItems)); } if (acceptEncoding != null) { localVarHeaderParams.put("Accept-Encoding", localVarApiClient.parameterToString(acceptEncoding)); } if (contentEncoding != null) { localVarHeaderParams.put("Content-Encoding", localVarApiClient.parameterToString(contentEncoding)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 getPaymentScheduleValidateBeforeCall(String paymentScheduleKey, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, Integer nextPendingItems, Integer lastProcessedItems, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { // verify the required parameter 'paymentScheduleKey' is set if (paymentScheduleKey == null) { throw new ApiException("Missing the required parameter 'paymentScheduleKey' when calling getPaymentSchedule(Async)"); } return getPaymentScheduleCall(paymentScheduleKey, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, nextPendingItems, lastProcessedItems, zuoraVersion, zuoraOrgIds, _callback); } /** * Retrieve a payment schedule * Retrieves a payment schedule by payment schedule key. **Note:** - The Payment Schedules feature is in the **Early Adopter** phase. We are actively soliciting feedback from a small set of early adopters before releasing it as generally available. To manage and access this feature through the self-service interface, see [Manage Features](https://knowledgecenter.zuora.com/Zuora_Payments/Payments_Settings/Manage_Features) in the Knowledge Center. - This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. * @param paymentScheduleKey The unique ID or number of a payment schedule. For example, `8a90857b822459cd018224dcb9eb13be`, or `PS-00000007`. (required) * @param acceptEncoding Include the `Accept-Encoding: gzip` header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a `Content-Encoding` header with the compression algorithm so that your client can decompress it. (optional) * @param contentEncoding Include the `Content-Encoding: gzip` header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload. (optional) * @param authorization The value is in the `Bearer {token}` format where {token} is a valid OAuth token generated by calling [Create an OAuth token](https://www.zuora.com/developer/api-references/api/operation/createToken). (optional) * @param zuoraTrackId A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (`:`), semicolon (`;`), double quote (`\"`), and quote (`'`). (optional) * @param zuoraEntityIds An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. (optional) * @param nextPendingItems Number of next pending payment schedule items displayed in the response body. (optional) * @param lastProcessedItems Number of the most recent processed payment schedule items dispalyed in the response body. (optional) * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @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 PaymentScheduleResponse * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ protected PaymentScheduleResponse getPaymentSchedule(String paymentScheduleKey, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, Integer nextPendingItems, Integer lastProcessedItems, String zuoraVersion, String zuoraOrgIds) throws ApiException { ApiResponse localVarResp = getPaymentScheduleWithHttpInfo(paymentScheduleKey, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, nextPendingItems, lastProcessedItems, zuoraVersion, zuoraOrgIds); return localVarResp.getData(); } private ApiResponse getPaymentScheduleWithHttpInfo(String paymentScheduleKey, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, Integer nextPendingItems, Integer lastProcessedItems, String zuoraVersion, String zuoraOrgIds) throws ApiException { okhttp3.Call localVarCall = getPaymentScheduleValidateBeforeCall(paymentScheduleKey, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, nextPendingItems, lastProcessedItems, zuoraVersion, zuoraOrgIds, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call getPaymentScheduleAsync(String paymentScheduleKey, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, Integer nextPendingItems, Integer lastProcessedItems, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getPaymentScheduleValidateBeforeCall(paymentScheduleKey, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, nextPendingItems, lastProcessedItems, zuoraVersion, zuoraOrgIds, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class GetPaymentScheduleApi { private final String paymentScheduleKey; private String acceptEncoding; private String contentEncoding; private String authorization; private String zuoraTrackId; private String zuoraEntityIds; private Integer nextPendingItems; private Integer lastProcessedItems; private String zuoraVersion; private String zuoraOrgIds; private GetPaymentScheduleApi(String paymentScheduleKey) { this.paymentScheduleKey = paymentScheduleKey; } /** * Set acceptEncoding * @param acceptEncoding Include the `Accept-Encoding: gzip` header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a `Content-Encoding` header with the compression algorithm so that your client can decompress it. (optional) * @return GetPaymentScheduleApi */ public GetPaymentScheduleApi acceptEncoding(String acceptEncoding) { this.acceptEncoding = acceptEncoding; return this; } /** * Set contentEncoding * @param contentEncoding Include the `Content-Encoding: gzip` header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload. (optional) * @return GetPaymentScheduleApi */ public GetPaymentScheduleApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; return this; } /** * Set authorization * @param authorization The value is in the `Bearer {token}` format where {token} is a valid OAuth token generated by calling [Create an OAuth token](https://www.zuora.com/developer/api-references/api/operation/createToken). (optional) * @return GetPaymentScheduleApi */ public GetPaymentScheduleApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraTrackId * @param zuoraTrackId A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (`:`), semicolon (`;`), double quote (`\"`), and quote (`'`). (optional) * @return GetPaymentScheduleApi */ public GetPaymentScheduleApi zuoraTrackId(String zuoraTrackId) { this.zuoraTrackId = zuoraTrackId; return this; } /** * Set zuoraEntityIds * @param zuoraEntityIds An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. (optional) * @return GetPaymentScheduleApi */ public GetPaymentScheduleApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; return this; } /** * Set nextPendingItems * @param nextPendingItems Number of next pending payment schedule items displayed in the response body. (optional) * @return GetPaymentScheduleApi */ public GetPaymentScheduleApi nextPendingItems(Integer nextPendingItems) { this.nextPendingItems = nextPendingItems; return this; } /** * Set lastProcessedItems * @param lastProcessedItems Number of the most recent processed payment schedule items dispalyed in the response body. (optional) * @return GetPaymentScheduleApi */ public GetPaymentScheduleApi lastProcessedItems(Integer lastProcessedItems) { this.lastProcessedItems = lastProcessedItems; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return GetPaymentScheduleApi */ public GetPaymentScheduleApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * 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 GetPaymentScheduleApi */ public GetPaymentScheduleApi zuoraOrgIds(String zuoraOrgIds) { this.zuoraOrgIds = zuoraOrgIds; return this; } /** * Build call for getPaymentSchedule * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return getPaymentScheduleCall(paymentScheduleKey, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, nextPendingItems, lastProcessedItems, zuoraVersion, zuoraOrgIds, _callback); } /** * Execute getPaymentSchedule request * @return PaymentScheduleResponse * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public PaymentScheduleResponse execute() throws ApiException { ApiResponse localVarResp = getPaymentScheduleWithHttpInfo(paymentScheduleKey, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, nextPendingItems, lastProcessedItems, zuoraVersion, zuoraOrgIds); return localVarResp.getData(); } /** * Execute getPaymentSchedule request with HTTP info returned * @return ApiResponse<PaymentScheduleResponse> * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ private ApiResponse executeWithHttpInfo() throws ApiException { return getPaymentScheduleWithHttpInfo(paymentScheduleKey, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, nextPendingItems, lastProcessedItems, zuoraVersion, zuoraOrgIds); } /** * Execute getPaymentSchedule 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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return getPaymentScheduleAsync(paymentScheduleKey, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, nextPendingItems, lastProcessedItems, zuoraVersion, zuoraOrgIds, _callback); } } /** * Retrieve a payment schedule * Retrieves a payment schedule by payment schedule key. **Note:** - The Payment Schedules feature is in the **Early Adopter** phase. We are actively soliciting feedback from a small set of early adopters before releasing it as generally available. To manage and access this feature through the self-service interface, see [Manage Features](https://knowledgecenter.zuora.com/Zuora_Payments/Payments_Settings/Manage_Features) in the Knowledge Center. - This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. * @param paymentScheduleKey The unique ID or number of a payment schedule. For example, `8a90857b822459cd018224dcb9eb13be`, or `PS-00000007`. (required) * @return GetPaymentScheduleApi */ public GetPaymentScheduleApi getPaymentScheduleApi(String paymentScheduleKey) { return new GetPaymentScheduleApi(paymentScheduleKey); } private okhttp3.Call getPaymentScheduleItemCall(String itemId, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, 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/payment-schedule-items/{item-id}" .replace("{" + "item-id" + "}", localVarApiClient.escapeString(itemId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (acceptEncoding != null) { localVarHeaderParams.put("Accept-Encoding", localVarApiClient.parameterToString(acceptEncoding)); } if (contentEncoding != null) { localVarHeaderParams.put("Content-Encoding", localVarApiClient.parameterToString(contentEncoding)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 getPaymentScheduleItemValidateBeforeCall(String itemId, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { // verify the required parameter 'itemId' is set if (itemId == null) { throw new ApiException("Missing the required parameter 'itemId' when calling getPaymentScheduleItem(Async)"); } return getPaymentScheduleItemCall(itemId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); } /** * Retrieve a payment schedule item * Retrieves a payment schedule item by ID. **Note:** - The Payment Schedules feature is in the **Early Adopter** phase. We are actively soliciting feedback from a small set of early adopters before releasing it as generally available. To manage and access this feature through the self-service interface, see [Manage Features](https://knowledgecenter.zuora.com/Zuora_Payments/Payments_Settings/Manage_Features) in the Knowledge Center. - This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. * @param itemId The unique ID of a payment schedule item. (required) * @param acceptEncoding Include the `Accept-Encoding: gzip` header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a `Content-Encoding` header with the compression algorithm so that your client can decompress it. (optional) * @param contentEncoding Include the `Content-Encoding: gzip` header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload. (optional) * @param authorization The value is in the `Bearer {token}` format where {token} is a valid OAuth token generated by calling [Create an OAuth token](https://www.zuora.com/developer/api-references/api/operation/createToken). (optional) * @param zuoraTrackId A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (`:`), semicolon (`;`), double quote (`\"`), and quote (`'`). (optional) * @param zuoraEntityIds An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. (optional) * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @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 PaymentScheduleItemResponse * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ protected PaymentScheduleItemResponse getPaymentScheduleItem(String itemId, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds) throws ApiException { ApiResponse localVarResp = getPaymentScheduleItemWithHttpInfo(itemId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds); return localVarResp.getData(); } private ApiResponse getPaymentScheduleItemWithHttpInfo(String itemId, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds) throws ApiException { okhttp3.Call localVarCall = getPaymentScheduleItemValidateBeforeCall(itemId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call getPaymentScheduleItemAsync(String itemId, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getPaymentScheduleItemValidateBeforeCall(itemId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class GetPaymentScheduleItemApi { private final String itemId; private String acceptEncoding; private String contentEncoding; private String authorization; private String zuoraTrackId; private String zuoraEntityIds; private String zuoraVersion; private String zuoraOrgIds; private GetPaymentScheduleItemApi(String itemId) { this.itemId = itemId; } /** * Set acceptEncoding * @param acceptEncoding Include the `Accept-Encoding: gzip` header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a `Content-Encoding` header with the compression algorithm so that your client can decompress it. (optional) * @return GetPaymentScheduleItemApi */ public GetPaymentScheduleItemApi acceptEncoding(String acceptEncoding) { this.acceptEncoding = acceptEncoding; return this; } /** * Set contentEncoding * @param contentEncoding Include the `Content-Encoding: gzip` header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload. (optional) * @return GetPaymentScheduleItemApi */ public GetPaymentScheduleItemApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; return this; } /** * Set authorization * @param authorization The value is in the `Bearer {token}` format where {token} is a valid OAuth token generated by calling [Create an OAuth token](https://www.zuora.com/developer/api-references/api/operation/createToken). (optional) * @return GetPaymentScheduleItemApi */ public GetPaymentScheduleItemApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraTrackId * @param zuoraTrackId A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (`:`), semicolon (`;`), double quote (`\"`), and quote (`'`). (optional) * @return GetPaymentScheduleItemApi */ public GetPaymentScheduleItemApi zuoraTrackId(String zuoraTrackId) { this.zuoraTrackId = zuoraTrackId; return this; } /** * Set zuoraEntityIds * @param zuoraEntityIds An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. (optional) * @return GetPaymentScheduleItemApi */ public GetPaymentScheduleItemApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return GetPaymentScheduleItemApi */ public GetPaymentScheduleItemApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * 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 GetPaymentScheduleItemApi */ public GetPaymentScheduleItemApi zuoraOrgIds(String zuoraOrgIds) { this.zuoraOrgIds = zuoraOrgIds; return this; } /** * Build call for getPaymentScheduleItem * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return getPaymentScheduleItemCall(itemId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); } /** * Execute getPaymentScheduleItem request * @return PaymentScheduleItemResponse * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public PaymentScheduleItemResponse execute() throws ApiException { ApiResponse localVarResp = getPaymentScheduleItemWithHttpInfo(itemId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds); return localVarResp.getData(); } /** * Execute getPaymentScheduleItem request with HTTP info returned * @return ApiResponse<PaymentScheduleItemResponse> * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ private ApiResponse executeWithHttpInfo() throws ApiException { return getPaymentScheduleItemWithHttpInfo(itemId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds); } /** * Execute getPaymentScheduleItem 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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return getPaymentScheduleItemAsync(itemId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); } } /** * Retrieve a payment schedule item * Retrieves a payment schedule item by ID. **Note:** - The Payment Schedules feature is in the **Early Adopter** phase. We are actively soliciting feedback from a small set of early adopters before releasing it as generally available. To manage and access this feature through the self-service interface, see [Manage Features](https://knowledgecenter.zuora.com/Zuora_Payments/Payments_Settings/Manage_Features) in the Knowledge Center. - This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. * @param itemId The unique ID of a payment schedule item. (required) * @return GetPaymentScheduleItemApi */ public GetPaymentScheduleItemApi getPaymentScheduleItemApi(String itemId) { return new GetPaymentScheduleItemApi(itemId); } private okhttp3.Call getPaymentScheduleStatisticCall(LocalDate yyyyMmDd, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, 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/payment-schedules/statistics/{yyyy-mm-dd}" .replace("{" + "yyyy-mm-dd" + "}", localVarApiClient.escapeString(yyyyMmDd.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (acceptEncoding != null) { localVarHeaderParams.put("Accept-Encoding", localVarApiClient.parameterToString(acceptEncoding)); } if (contentEncoding != null) { localVarHeaderParams.put("Content-Encoding", localVarApiClient.parameterToString(contentEncoding)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 getPaymentScheduleStatisticValidateBeforeCall(LocalDate yyyyMmDd, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { // verify the required parameter 'yyyyMmDd' is set if (yyyyMmDd == null) { throw new ApiException("Missing the required parameter 'yyyyMmDd' when calling getPaymentScheduleStatistic(Async)"); } return getPaymentScheduleStatisticCall(yyyyMmDd, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); } /** * Retrieve payment schedule statistic of a date * Retrieves the payment schedule statistic of a specific date. **Note:** - The Payment Schedules feature is in the **Early Adopter** phase. We are actively soliciting feedback from a small set of early adopters before releasing it as generally available. To manage and access this feature through the self-service interface, see [Manage Features](https://knowledgecenter.zuora.com/Zuora_Payments/Payments_Settings/Manage_Features) in the Knowledge Center. * @param yyyyMmDd Specifies the date of the payment schedule statistic you want to view. (required) * @param acceptEncoding Include the `Accept-Encoding: gzip` header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a `Content-Encoding` header with the compression algorithm so that your client can decompress it. (optional) * @param contentEncoding Include the `Content-Encoding: gzip` header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload. (optional) * @param authorization The value is in the `Bearer {token}` format where {token} is a valid OAuth token generated by calling [Create an OAuth token](https://www.zuora.com/developer/api-references/api/operation/createToken). (optional) * @param zuoraTrackId A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (`:`), semicolon (`;`), double quote (`\"`), and quote (`'`). (optional) * @param zuoraEntityIds An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. (optional) * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @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 GetPaymentScheduleStatisticResponse * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ protected GetPaymentScheduleStatisticResponse getPaymentScheduleStatistic(LocalDate yyyyMmDd, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds) throws ApiException { ApiResponse localVarResp = getPaymentScheduleStatisticWithHttpInfo(yyyyMmDd, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds); return localVarResp.getData(); } private ApiResponse getPaymentScheduleStatisticWithHttpInfo(LocalDate yyyyMmDd, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds) throws ApiException { okhttp3.Call localVarCall = getPaymentScheduleStatisticValidateBeforeCall(yyyyMmDd, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call getPaymentScheduleStatisticAsync(LocalDate yyyyMmDd, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getPaymentScheduleStatisticValidateBeforeCall(yyyyMmDd, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class GetPaymentScheduleStatisticApi { private final LocalDate yyyyMmDd; private String acceptEncoding; private String contentEncoding; private String authorization; private String zuoraTrackId; private String zuoraEntityIds; private String zuoraVersion; private String zuoraOrgIds; private GetPaymentScheduleStatisticApi(LocalDate yyyyMmDd) { this.yyyyMmDd = yyyyMmDd; } /** * Set acceptEncoding * @param acceptEncoding Include the `Accept-Encoding: gzip` header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a `Content-Encoding` header with the compression algorithm so that your client can decompress it. (optional) * @return GetPaymentScheduleStatisticApi */ public GetPaymentScheduleStatisticApi acceptEncoding(String acceptEncoding) { this.acceptEncoding = acceptEncoding; return this; } /** * Set contentEncoding * @param contentEncoding Include the `Content-Encoding: gzip` header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload. (optional) * @return GetPaymentScheduleStatisticApi */ public GetPaymentScheduleStatisticApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; return this; } /** * Set authorization * @param authorization The value is in the `Bearer {token}` format where {token} is a valid OAuth token generated by calling [Create an OAuth token](https://www.zuora.com/developer/api-references/api/operation/createToken). (optional) * @return GetPaymentScheduleStatisticApi */ public GetPaymentScheduleStatisticApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraTrackId * @param zuoraTrackId A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (`:`), semicolon (`;`), double quote (`\"`), and quote (`'`). (optional) * @return GetPaymentScheduleStatisticApi */ public GetPaymentScheduleStatisticApi zuoraTrackId(String zuoraTrackId) { this.zuoraTrackId = zuoraTrackId; return this; } /** * Set zuoraEntityIds * @param zuoraEntityIds An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. (optional) * @return GetPaymentScheduleStatisticApi */ public GetPaymentScheduleStatisticApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return GetPaymentScheduleStatisticApi */ public GetPaymentScheduleStatisticApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * 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 GetPaymentScheduleStatisticApi */ public GetPaymentScheduleStatisticApi zuoraOrgIds(String zuoraOrgIds) { this.zuoraOrgIds = zuoraOrgIds; return this; } /** * Build call for getPaymentScheduleStatistic * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return getPaymentScheduleStatisticCall(yyyyMmDd, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); } /** * Execute getPaymentScheduleStatistic request * @return GetPaymentScheduleStatisticResponse * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public GetPaymentScheduleStatisticResponse execute() throws ApiException { ApiResponse localVarResp = getPaymentScheduleStatisticWithHttpInfo(yyyyMmDd, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds); return localVarResp.getData(); } /** * Execute getPaymentScheduleStatistic request with HTTP info returned * @return ApiResponse<GetPaymentScheduleStatisticResponse> * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ private ApiResponse executeWithHttpInfo() throws ApiException { return getPaymentScheduleStatisticWithHttpInfo(yyyyMmDd, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds); } /** * Execute getPaymentScheduleStatistic 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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return getPaymentScheduleStatisticAsync(yyyyMmDd, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); } } /** * Retrieve payment schedule statistic of a date * Retrieves the payment schedule statistic of a specific date. **Note:** - The Payment Schedules feature is in the **Early Adopter** phase. We are actively soliciting feedback from a small set of early adopters before releasing it as generally available. To manage and access this feature through the self-service interface, see [Manage Features](https://knowledgecenter.zuora.com/Zuora_Payments/Payments_Settings/Manage_Features) in the Knowledge Center. * @param yyyyMmDd Specifies the date of the payment schedule statistic you want to view. (required) * @return GetPaymentScheduleStatisticApi */ public GetPaymentScheduleStatisticApi getPaymentScheduleStatisticApi(LocalDate yyyyMmDd) { return new GetPaymentScheduleStatisticApi(yyyyMmDd); } private okhttp3.Call getPaymentSchedulesCall(String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, Integer lastProcessedItems, Integer nextPendingItems, String accountId, Integer accountNumber, String zuoraVersion, 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/payment-schedules"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (lastProcessedItems != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("lastProcessedItems", lastProcessedItems)); } if (nextPendingItems != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("nextPendingItems", nextPendingItems)); } if (accountId != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("accountId", accountId)); } if (accountNumber != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("accountNumber", accountNumber)); } if (acceptEncoding != null) { localVarHeaderParams.put("Accept-Encoding", localVarApiClient.parameterToString(acceptEncoding)); } if (contentEncoding != null) { localVarHeaderParams.put("Content-Encoding", localVarApiClient.parameterToString(contentEncoding)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 getPaymentSchedulesValidateBeforeCall(String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, Integer lastProcessedItems, Integer nextPendingItems, String accountId, Integer accountNumber, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { return getPaymentSchedulesCall(acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, lastProcessedItems, nextPendingItems, accountId, accountNumber, zuoraVersion, zuoraOrgIds, _callback); } /** * List payment schedules by customer account * Retrieves payment schedules of a customer account. **Note:** - The Payment Schedules feature is in the **Early Adopter** phase. We are actively soliciting feedback from a small set of early adopters before releasing it as generally available. To manage and access this feature through the self-service interface, see [Manage Features](https://knowledgecenter.zuora.com/Zuora_Payments/Payments_Settings/Manage_Features) in the Knowledge Center. - This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. * @param acceptEncoding Include the `Accept-Encoding: gzip` header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a `Content-Encoding` header with the compression algorithm so that your client can decompress it. (optional) * @param contentEncoding Include the `Content-Encoding: gzip` header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload. (optional) * @param authorization The value is in the `Bearer {token}` format where {token} is a valid OAuth token generated by calling [Create an OAuth token](https://www.zuora.com/developer/api-references/api/operation/createToken). (optional) * @param zuoraTrackId A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (`:`), semicolon (`;`), double quote (`\"`), and quote (`'`). (optional) * @param zuoraEntityIds An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. (optional) * @param lastProcessedItems Number of the most recent processed payment schedules dispalyed in the response body. (optional) * @param nextPendingItems Number of next pending payment schedule items displayed in the response body. (optional) * @param accountId The ID of the customer account. If neither `accountId` nor `accountNumber` is specified, all payment schedules will be returned. (optional) * @param accountNumber The number of the customer account. If neither `accountId` nor `accountNumber` is specified, all payment schedules will be returned. (optional) * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @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 GetPaymentSchedulesResponse * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ protected GetPaymentSchedulesResponse getPaymentSchedules(String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, Integer lastProcessedItems, Integer nextPendingItems, String accountId, Integer accountNumber, String zuoraVersion, String zuoraOrgIds) throws ApiException { ApiResponse localVarResp = getPaymentSchedulesWithHttpInfo(acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, lastProcessedItems, nextPendingItems, accountId, accountNumber, zuoraVersion, zuoraOrgIds); return localVarResp.getData(); } private ApiResponse getPaymentSchedulesWithHttpInfo(String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, Integer lastProcessedItems, Integer nextPendingItems, String accountId, Integer accountNumber, String zuoraVersion, String zuoraOrgIds) throws ApiException { okhttp3.Call localVarCall = getPaymentSchedulesValidateBeforeCall(acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, lastProcessedItems, nextPendingItems, accountId, accountNumber, zuoraVersion, zuoraOrgIds, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call getPaymentSchedulesAsync(String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, Integer lastProcessedItems, Integer nextPendingItems, String accountId, Integer accountNumber, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getPaymentSchedulesValidateBeforeCall(acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, lastProcessedItems, nextPendingItems, accountId, accountNumber, zuoraVersion, zuoraOrgIds, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class GetPaymentSchedulesApi { private String acceptEncoding; private String contentEncoding; private String authorization; private String zuoraTrackId; private String zuoraEntityIds; private Integer lastProcessedItems; private Integer nextPendingItems; private String accountId; private Integer accountNumber; private String zuoraVersion; private String zuoraOrgIds; private GetPaymentSchedulesApi() { } /** * Set acceptEncoding * @param acceptEncoding Include the `Accept-Encoding: gzip` header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a `Content-Encoding` header with the compression algorithm so that your client can decompress it. (optional) * @return GetPaymentSchedulesApi */ public GetPaymentSchedulesApi acceptEncoding(String acceptEncoding) { this.acceptEncoding = acceptEncoding; return this; } /** * Set contentEncoding * @param contentEncoding Include the `Content-Encoding: gzip` header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload. (optional) * @return GetPaymentSchedulesApi */ public GetPaymentSchedulesApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; return this; } /** * Set authorization * @param authorization The value is in the `Bearer {token}` format where {token} is a valid OAuth token generated by calling [Create an OAuth token](https://www.zuora.com/developer/api-references/api/operation/createToken). (optional) * @return GetPaymentSchedulesApi */ public GetPaymentSchedulesApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraTrackId * @param zuoraTrackId A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (`:`), semicolon (`;`), double quote (`\"`), and quote (`'`). (optional) * @return GetPaymentSchedulesApi */ public GetPaymentSchedulesApi zuoraTrackId(String zuoraTrackId) { this.zuoraTrackId = zuoraTrackId; return this; } /** * Set zuoraEntityIds * @param zuoraEntityIds An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. (optional) * @return GetPaymentSchedulesApi */ public GetPaymentSchedulesApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; return this; } /** * Set lastProcessedItems * @param lastProcessedItems Number of the most recent processed payment schedules dispalyed in the response body. (optional) * @return GetPaymentSchedulesApi */ public GetPaymentSchedulesApi lastProcessedItems(Integer lastProcessedItems) { this.lastProcessedItems = lastProcessedItems; return this; } /** * Set nextPendingItems * @param nextPendingItems Number of next pending payment schedule items displayed in the response body. (optional) * @return GetPaymentSchedulesApi */ public GetPaymentSchedulesApi nextPendingItems(Integer nextPendingItems) { this.nextPendingItems = nextPendingItems; return this; } /** * Set accountId * @param accountId The ID of the customer account. If neither `accountId` nor `accountNumber` is specified, all payment schedules will be returned. (optional) * @return GetPaymentSchedulesApi */ public GetPaymentSchedulesApi accountId(String accountId) { this.accountId = accountId; return this; } /** * Set accountNumber * @param accountNumber The number of the customer account. If neither `accountId` nor `accountNumber` is specified, all payment schedules will be returned. (optional) * @return GetPaymentSchedulesApi */ public GetPaymentSchedulesApi accountNumber(Integer accountNumber) { this.accountNumber = accountNumber; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return GetPaymentSchedulesApi */ public GetPaymentSchedulesApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * 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 GetPaymentSchedulesApi */ public GetPaymentSchedulesApi zuoraOrgIds(String zuoraOrgIds) { this.zuoraOrgIds = zuoraOrgIds; return this; } /** * Build call for getPaymentSchedules * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return getPaymentSchedulesCall(acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, lastProcessedItems, nextPendingItems, accountId, accountNumber, zuoraVersion, zuoraOrgIds, _callback); } /** * Execute getPaymentSchedules request * @return GetPaymentSchedulesResponse * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public GetPaymentSchedulesResponse execute() throws ApiException { ApiResponse localVarResp = getPaymentSchedulesWithHttpInfo(acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, lastProcessedItems, nextPendingItems, accountId, accountNumber, zuoraVersion, zuoraOrgIds); return localVarResp.getData(); } /** * Execute getPaymentSchedules request with HTTP info returned * @return ApiResponse<GetPaymentSchedulesResponse> * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ private ApiResponse executeWithHttpInfo() throws ApiException { return getPaymentSchedulesWithHttpInfo(acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, lastProcessedItems, nextPendingItems, accountId, accountNumber, zuoraVersion, zuoraOrgIds); } /** * Execute getPaymentSchedules 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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return getPaymentSchedulesAsync(acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, lastProcessedItems, nextPendingItems, accountId, accountNumber, zuoraVersion, zuoraOrgIds, _callback); } } /** * List payment schedules by customer account * Retrieves payment schedules of a customer account. **Note:** - The Payment Schedules feature is in the **Early Adopter** phase. We are actively soliciting feedback from a small set of early adopters before releasing it as generally available. To manage and access this feature through the self-service interface, see [Manage Features](https://knowledgecenter.zuora.com/Zuora_Payments/Payments_Settings/Manage_Features) in the Knowledge Center. - This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. * @return GetPaymentSchedulesApi */ public GetPaymentSchedulesApi getPaymentSchedulesApi() { return new GetPaymentSchedulesApi(); } private okhttp3.Call retryPaymentScheduleItemCall(RetryPaymentScheduleItemRequest body, String idempotencyKey, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, 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 = body; // create path and map variables String localVarPath = "/v1/payment-schedule-items/retry-payment"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); 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 (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 retryPaymentScheduleItemValidateBeforeCall(RetryPaymentScheduleItemRequest body, String idempotencyKey, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling retryPaymentScheduleItem(Async)"); } return retryPaymentScheduleItemCall(body, idempotencyKey, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); } /** * Retry failed payment schedule items * Retries failed payment schedule items. The payment method and payment gateway of the failed payment can be updated to new values before the retry. Note that you can retry a payment schedule item only when the payment schedule item is either in the `Error` or `Pending` status. **Note:** - The Payment Schedules feature is in the **Early Adopter** phase. We are actively soliciting feedback from a small set of early adopters before releasing it as generally available. To manage and access this feature through the self-service interface, see [Manage Features](https://knowledgecenter.zuora.com/Zuora_Payments/Payments_Settings/Manage_Features) in the Knowledge Center. - This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. * @param body (required) * @param idempotencyKey Specify a unique idempotency key if you want to perform an idempotent POST or PATCH request. Do not use this header in other request types. With this header specified, the Zuora server can identify subsequent retries of the same request using this value, which prevents the same operation from being performed multiple times by accident. (optional) * @param acceptEncoding Include the `Accept-Encoding: gzip` header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a `Content-Encoding` header with the compression algorithm so that your client can decompress it. (optional) * @param contentEncoding Include the `Content-Encoding: gzip` header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload. (optional) * @param authorization The value is in the `Bearer {token}` format where {token} is a valid OAuth token generated by calling [Create an OAuth token](https://www.zuora.com/developer/api-references/api/operation/createToken). (optional) * @param zuoraTrackId A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (`:`), semicolon (`;`), double quote (`\"`), and quote (`'`). (optional) * @param zuoraEntityIds An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. (optional) * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @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 RetryPaymentScheduleItemResponse * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ protected RetryPaymentScheduleItemResponse retryPaymentScheduleItem(RetryPaymentScheduleItemRequest body, String idempotencyKey, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds) throws ApiException { ApiResponse localVarResp = retryPaymentScheduleItemWithHttpInfo(body, idempotencyKey, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds); return localVarResp.getData(); } private ApiResponse retryPaymentScheduleItemWithHttpInfo(RetryPaymentScheduleItemRequest body, String idempotencyKey, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds) throws ApiException { okhttp3.Call localVarCall = retryPaymentScheduleItemValidateBeforeCall(body, idempotencyKey, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call retryPaymentScheduleItemAsync(RetryPaymentScheduleItemRequest body, String idempotencyKey, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = retryPaymentScheduleItemValidateBeforeCall(body, idempotencyKey, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class RetryPaymentScheduleItemApi { private final RetryPaymentScheduleItemRequest body; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String authorization; private String zuoraTrackId; private String zuoraEntityIds; private String zuoraVersion; private String zuoraOrgIds; private RetryPaymentScheduleItemApi(RetryPaymentScheduleItemRequest body) { this.body = body; } /** * Set idempotencyKey * @param idempotencyKey Specify a unique idempotency key if you want to perform an idempotent POST or PATCH request. Do not use this header in other request types. With this header specified, the Zuora server can identify subsequent retries of the same request using this value, which prevents the same operation from being performed multiple times by accident. (optional) * @return RetryPaymentScheduleItemApi */ public RetryPaymentScheduleItemApi idempotencyKey(String idempotencyKey) { this.idempotencyKey = idempotencyKey; return this; } /** * Set acceptEncoding * @param acceptEncoding Include the `Accept-Encoding: gzip` header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a `Content-Encoding` header with the compression algorithm so that your client can decompress it. (optional) * @return RetryPaymentScheduleItemApi */ public RetryPaymentScheduleItemApi acceptEncoding(String acceptEncoding) { this.acceptEncoding = acceptEncoding; return this; } /** * Set contentEncoding * @param contentEncoding Include the `Content-Encoding: gzip` header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload. (optional) * @return RetryPaymentScheduleItemApi */ public RetryPaymentScheduleItemApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; return this; } /** * Set authorization * @param authorization The value is in the `Bearer {token}` format where {token} is a valid OAuth token generated by calling [Create an OAuth token](https://www.zuora.com/developer/api-references/api/operation/createToken). (optional) * @return RetryPaymentScheduleItemApi */ public RetryPaymentScheduleItemApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraTrackId * @param zuoraTrackId A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (`:`), semicolon (`;`), double quote (`\"`), and quote (`'`). (optional) * @return RetryPaymentScheduleItemApi */ public RetryPaymentScheduleItemApi zuoraTrackId(String zuoraTrackId) { this.zuoraTrackId = zuoraTrackId; return this; } /** * Set zuoraEntityIds * @param zuoraEntityIds An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. (optional) * @return RetryPaymentScheduleItemApi */ public RetryPaymentScheduleItemApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return RetryPaymentScheduleItemApi */ public RetryPaymentScheduleItemApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * 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 RetryPaymentScheduleItemApi */ public RetryPaymentScheduleItemApi zuoraOrgIds(String zuoraOrgIds) { this.zuoraOrgIds = zuoraOrgIds; return this; } /** * Build call for retryPaymentScheduleItem * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return retryPaymentScheduleItemCall(body, idempotencyKey, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); } /** * Execute retryPaymentScheduleItem request * @return RetryPaymentScheduleItemResponse * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public RetryPaymentScheduleItemResponse execute() throws ApiException { ApiResponse localVarResp = retryPaymentScheduleItemWithHttpInfo(body, idempotencyKey, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds); return localVarResp.getData(); } /** * Execute retryPaymentScheduleItem request with HTTP info returned * @return ApiResponse<RetryPaymentScheduleItemResponse> * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ private ApiResponse executeWithHttpInfo() throws ApiException { return retryPaymentScheduleItemWithHttpInfo(body, idempotencyKey, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds); } /** * Execute retryPaymentScheduleItem 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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return retryPaymentScheduleItemAsync(body, idempotencyKey, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); } } /** * Retry failed payment schedule items * Retries failed payment schedule items. The payment method and payment gateway of the failed payment can be updated to new values before the retry. Note that you can retry a payment schedule item only when the payment schedule item is either in the `Error` or `Pending` status. **Note:** - The Payment Schedules feature is in the **Early Adopter** phase. We are actively soliciting feedback from a small set of early adopters before releasing it as generally available. To manage and access this feature through the self-service interface, see [Manage Features](https://knowledgecenter.zuora.com/Zuora_Payments/Payments_Settings/Manage_Features) in the Knowledge Center. - This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. * @param body (required) * @return RetryPaymentScheduleItemApi */ public RetryPaymentScheduleItemApi retryPaymentScheduleItemApi(RetryPaymentScheduleItemRequest body) { return new RetryPaymentScheduleItemApi(body); } private okhttp3.Call skipPaymentScheduleItemCall(String itemId, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, 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/payment-schedule-items/{item-id}/skip" .replace("{" + "item-id" + "}", localVarApiClient.escapeString(itemId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (acceptEncoding != null) { localVarHeaderParams.put("Accept-Encoding", localVarApiClient.parameterToString(acceptEncoding)); } if (contentEncoding != null) { localVarHeaderParams.put("Content-Encoding", localVarApiClient.parameterToString(contentEncoding)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call skipPaymentScheduleItemValidateBeforeCall(String itemId, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { // verify the required parameter 'itemId' is set if (itemId == null) { throw new ApiException("Missing the required parameter 'itemId' when calling skipPaymentScheduleItem(Async)"); } return skipPaymentScheduleItemCall(itemId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); } /** * Skip a payment schedule item * Skips a payment schedule item by ID. The skipped payment schedule item will turn to the `canceled` status, and a new item will be scheduled on the next recurring date after the last existing scheduled date. **Note:** - Only payment schedule items in recurring payment schedules can be skipped, and the item must be in the `pending` status. - The Payment Schedules feature is in the **Early Adopter** phase. We are actively soliciting feedback from a small set of early adopters before releasing it as generally available. To manage and access this feature through the self-service interface, see [Manage Features](https://knowledgecenter.zuora.com/Zuora_Payments/Payments_Settings/Manage_Features) in the Knowledge Center. - This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. * @param itemId The unique ID of a payment schedule item. (required) * @param acceptEncoding Include the `Accept-Encoding: gzip` header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a `Content-Encoding` header with the compression algorithm so that your client can decompress it. (optional) * @param contentEncoding Include the `Content-Encoding: gzip` header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload. (optional) * @param authorization The value is in the `Bearer {token}` format where {token} is a valid OAuth token generated by calling [Create an OAuth token](https://www.zuora.com/developer/api-references/api/operation/createToken). (optional) * @param zuoraTrackId A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (`:`), semicolon (`;`), double quote (`\"`), and quote (`'`). (optional) * @param zuoraEntityIds An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. (optional) * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @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 PaymentScheduleItemResponse * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ protected PaymentScheduleItemResponse skipPaymentScheduleItem(String itemId, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds) throws ApiException { ApiResponse localVarResp = skipPaymentScheduleItemWithHttpInfo(itemId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds); return localVarResp.getData(); } private ApiResponse skipPaymentScheduleItemWithHttpInfo(String itemId, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds) throws ApiException { okhttp3.Call localVarCall = skipPaymentScheduleItemValidateBeforeCall(itemId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call skipPaymentScheduleItemAsync(String itemId, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = skipPaymentScheduleItemValidateBeforeCall(itemId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class SkipPaymentScheduleItemApi { private final String itemId; private String acceptEncoding; private String contentEncoding; private String authorization; private String zuoraTrackId; private String zuoraEntityIds; private String zuoraVersion; private String zuoraOrgIds; private SkipPaymentScheduleItemApi(String itemId) { this.itemId = itemId; } /** * Set acceptEncoding * @param acceptEncoding Include the `Accept-Encoding: gzip` header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a `Content-Encoding` header with the compression algorithm so that your client can decompress it. (optional) * @return SkipPaymentScheduleItemApi */ public SkipPaymentScheduleItemApi acceptEncoding(String acceptEncoding) { this.acceptEncoding = acceptEncoding; return this; } /** * Set contentEncoding * @param contentEncoding Include the `Content-Encoding: gzip` header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload. (optional) * @return SkipPaymentScheduleItemApi */ public SkipPaymentScheduleItemApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; return this; } /** * Set authorization * @param authorization The value is in the `Bearer {token}` format where {token} is a valid OAuth token generated by calling [Create an OAuth token](https://www.zuora.com/developer/api-references/api/operation/createToken). (optional) * @return SkipPaymentScheduleItemApi */ public SkipPaymentScheduleItemApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraTrackId * @param zuoraTrackId A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (`:`), semicolon (`;`), double quote (`\"`), and quote (`'`). (optional) * @return SkipPaymentScheduleItemApi */ public SkipPaymentScheduleItemApi zuoraTrackId(String zuoraTrackId) { this.zuoraTrackId = zuoraTrackId; return this; } /** * Set zuoraEntityIds * @param zuoraEntityIds An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. (optional) * @return SkipPaymentScheduleItemApi */ public SkipPaymentScheduleItemApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return SkipPaymentScheduleItemApi */ public SkipPaymentScheduleItemApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * 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 SkipPaymentScheduleItemApi */ public SkipPaymentScheduleItemApi zuoraOrgIds(String zuoraOrgIds) { this.zuoraOrgIds = zuoraOrgIds; return this; } /** * Build call for skipPaymentScheduleItem * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return skipPaymentScheduleItemCall(itemId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); } /** * Execute skipPaymentScheduleItem request * @return PaymentScheduleItemResponse * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public PaymentScheduleItemResponse execute() throws ApiException { ApiResponse localVarResp = skipPaymentScheduleItemWithHttpInfo(itemId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds); return localVarResp.getData(); } /** * Execute skipPaymentScheduleItem request with HTTP info returned * @return ApiResponse<PaymentScheduleItemResponse> * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ private ApiResponse executeWithHttpInfo() throws ApiException { return skipPaymentScheduleItemWithHttpInfo(itemId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds); } /** * Execute skipPaymentScheduleItem 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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return skipPaymentScheduleItemAsync(itemId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); } } /** * Skip a payment schedule item * Skips a payment schedule item by ID. The skipped payment schedule item will turn to the `canceled` status, and a new item will be scheduled on the next recurring date after the last existing scheduled date. **Note:** - Only payment schedule items in recurring payment schedules can be skipped, and the item must be in the `pending` status. - The Payment Schedules feature is in the **Early Adopter** phase. We are actively soliciting feedback from a small set of early adopters before releasing it as generally available. To manage and access this feature through the self-service interface, see [Manage Features](https://knowledgecenter.zuora.com/Zuora_Payments/Payments_Settings/Manage_Features) in the Knowledge Center. - This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. * @param itemId The unique ID of a payment schedule item. (required) * @return SkipPaymentScheduleItemApi */ public SkipPaymentScheduleItemApi skipPaymentScheduleItemApi(String itemId) { return new SkipPaymentScheduleItemApi(itemId); } private okhttp3.Call updatePaymentScheduleCall(String paymentScheduleKey, UpdatePaymentScheduleRequest body, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, 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 = body; // create path and map variables String localVarPath = "/v1/payment-schedules/{paymentScheduleKey}" .replace("{" + "paymentScheduleKey" + "}", localVarApiClient.escapeString(paymentScheduleKey.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (acceptEncoding != null) { localVarHeaderParams.put("Accept-Encoding", localVarApiClient.parameterToString(acceptEncoding)); } if (contentEncoding != null) { localVarHeaderParams.put("Content-Encoding", localVarApiClient.parameterToString(contentEncoding)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 updatePaymentScheduleValidateBeforeCall(String paymentScheduleKey, UpdatePaymentScheduleRequest body, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { // verify the required parameter 'paymentScheduleKey' is set if (paymentScheduleKey == null) { throw new ApiException("Missing the required parameter 'paymentScheduleKey' when calling updatePaymentSchedule(Async)"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling updatePaymentSchedule(Async)"); } return updatePaymentScheduleCall(paymentScheduleKey, body, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); } /** * Update a payment schedule * Updates a payment schedule. For custom payment schedules, only the custom fields on the payment schedules can be udpated. Use the [Update a payment schedule item](https://www.zuora.com/developer/api-references/api/operation/Put_PaymentScheduleItem/) operation to update payment schedule items of custom payment schedule. Note the following rules for the `periodStartDate`, `period`, and `occurrences`: - If `periodStartDate` is specified, all pending payment schedule items will be rescheduled using this new `periodStartDate`. If `period` is changed, we recommend passing in `periodStartDate`. Otherwise, the system would use the original start date if there is no processed or canceled items, or the last processed or canceled '`scheduleDate` + 1 `period`' as the new `periodStartDate`. - If only `occurrences` is updated, the new item will start with the last processed or canceled '`scheduleDate` + 1 `period`'. **Note:** - The Payment Schedules feature is in the **Early Adopter** phase. We are actively soliciting feedback from a small set of early adopters before releasing it as generally available. To manage and access this feature through the self-service interface, see [Manage Features](https://knowledgecenter.zuora.com/Zuora_Payments/Payments_Settings/Manage_Features) in the Knowledge Center. - This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. * @param paymentScheduleKey The unique ID or number of a payment schedule. For example, `8a90857b822459cd018224dcb9eb13be`, or `PS-00000007`. (required) * @param body (required) * @param acceptEncoding Include the `Accept-Encoding: gzip` header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a `Content-Encoding` header with the compression algorithm so that your client can decompress it. (optional) * @param contentEncoding Include the `Content-Encoding: gzip` header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload. (optional) * @param authorization The value is in the `Bearer {token}` format where {token} is a valid OAuth token generated by calling [Create an OAuth token](https://www.zuora.com/developer/api-references/api/operation/createToken). (optional) * @param zuoraTrackId A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (`:`), semicolon (`;`), double quote (`\"`), and quote (`'`). (optional) * @param zuoraEntityIds An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. (optional) * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @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 PaymentScheduleResponse * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ protected PaymentScheduleResponse updatePaymentSchedule(String paymentScheduleKey, UpdatePaymentScheduleRequest body, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds) throws ApiException { ApiResponse localVarResp = updatePaymentScheduleWithHttpInfo(paymentScheduleKey, body, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds); return localVarResp.getData(); } private ApiResponse updatePaymentScheduleWithHttpInfo(String paymentScheduleKey, UpdatePaymentScheduleRequest body, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds) throws ApiException { okhttp3.Call localVarCall = updatePaymentScheduleValidateBeforeCall(paymentScheduleKey, body, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call updatePaymentScheduleAsync(String paymentScheduleKey, UpdatePaymentScheduleRequest body, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updatePaymentScheduleValidateBeforeCall(paymentScheduleKey, body, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class UpdatePaymentScheduleApi { private final String paymentScheduleKey; private final UpdatePaymentScheduleRequest body; private String acceptEncoding; private String contentEncoding; private String authorization; private String zuoraTrackId; private String zuoraEntityIds; private String zuoraVersion; private String zuoraOrgIds; private UpdatePaymentScheduleApi(String paymentScheduleKey, UpdatePaymentScheduleRequest body) { this.paymentScheduleKey = paymentScheduleKey; this.body = body; } /** * Set acceptEncoding * @param acceptEncoding Include the `Accept-Encoding: gzip` header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a `Content-Encoding` header with the compression algorithm so that your client can decompress it. (optional) * @return UpdatePaymentScheduleApi */ public UpdatePaymentScheduleApi acceptEncoding(String acceptEncoding) { this.acceptEncoding = acceptEncoding; return this; } /** * Set contentEncoding * @param contentEncoding Include the `Content-Encoding: gzip` header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload. (optional) * @return UpdatePaymentScheduleApi */ public UpdatePaymentScheduleApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; return this; } /** * Set authorization * @param authorization The value is in the `Bearer {token}` format where {token} is a valid OAuth token generated by calling [Create an OAuth token](https://www.zuora.com/developer/api-references/api/operation/createToken). (optional) * @return UpdatePaymentScheduleApi */ public UpdatePaymentScheduleApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraTrackId * @param zuoraTrackId A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (`:`), semicolon (`;`), double quote (`\"`), and quote (`'`). (optional) * @return UpdatePaymentScheduleApi */ public UpdatePaymentScheduleApi zuoraTrackId(String zuoraTrackId) { this.zuoraTrackId = zuoraTrackId; return this; } /** * Set zuoraEntityIds * @param zuoraEntityIds An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. (optional) * @return UpdatePaymentScheduleApi */ public UpdatePaymentScheduleApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return UpdatePaymentScheduleApi */ public UpdatePaymentScheduleApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * 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 UpdatePaymentScheduleApi */ public UpdatePaymentScheduleApi zuoraOrgIds(String zuoraOrgIds) { this.zuoraOrgIds = zuoraOrgIds; return this; } /** * Build call for updatePaymentSchedule * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return updatePaymentScheduleCall(paymentScheduleKey, body, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); } /** * Execute updatePaymentSchedule request * @return PaymentScheduleResponse * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public PaymentScheduleResponse execute() throws ApiException { ApiResponse localVarResp = updatePaymentScheduleWithHttpInfo(paymentScheduleKey, body, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds); return localVarResp.getData(); } /** * Execute updatePaymentSchedule request with HTTP info returned * @return ApiResponse<PaymentScheduleResponse> * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ private ApiResponse executeWithHttpInfo() throws ApiException { return updatePaymentScheduleWithHttpInfo(paymentScheduleKey, body, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds); } /** * Execute updatePaymentSchedule 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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return updatePaymentScheduleAsync(paymentScheduleKey, body, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); } } /** * Update a payment schedule * Updates a payment schedule. For custom payment schedules, only the custom fields on the payment schedules can be udpated. Use the [Update a payment schedule item](https://www.zuora.com/developer/api-references/api/operation/Put_PaymentScheduleItem/) operation to update payment schedule items of custom payment schedule. Note the following rules for the `periodStartDate`, `period`, and `occurrences`: - If `periodStartDate` is specified, all pending payment schedule items will be rescheduled using this new `periodStartDate`. If `period` is changed, we recommend passing in `periodStartDate`. Otherwise, the system would use the original start date if there is no processed or canceled items, or the last processed or canceled '`scheduleDate` + 1 `period`' as the new `periodStartDate`. - If only `occurrences` is updated, the new item will start with the last processed or canceled '`scheduleDate` + 1 `period`'. **Note:** - The Payment Schedules feature is in the **Early Adopter** phase. We are actively soliciting feedback from a small set of early adopters before releasing it as generally available. To manage and access this feature through the self-service interface, see [Manage Features](https://knowledgecenter.zuora.com/Zuora_Payments/Payments_Settings/Manage_Features) in the Knowledge Center. - This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. * @param paymentScheduleKey The unique ID or number of a payment schedule. For example, `8a90857b822459cd018224dcb9eb13be`, or `PS-00000007`. (required) * @param body (required) * @return UpdatePaymentScheduleApi */ public UpdatePaymentScheduleApi updatePaymentScheduleApi(String paymentScheduleKey, UpdatePaymentScheduleRequest body) { return new UpdatePaymentScheduleApi(paymentScheduleKey, body); } private okhttp3.Call updatePaymentScheduleItemCall(String itemId, UpdatePaymentScheduleItemRequest body, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, 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 = body; // create path and map variables String localVarPath = "/v1/payment-schedule-items/{item-id}" .replace("{" + "item-id" + "}", localVarApiClient.escapeString(itemId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (acceptEncoding != null) { localVarHeaderParams.put("Accept-Encoding", localVarApiClient.parameterToString(acceptEncoding)); } if (contentEncoding != null) { localVarHeaderParams.put("Content-Encoding", localVarApiClient.parameterToString(contentEncoding)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 updatePaymentScheduleItemValidateBeforeCall(String itemId, UpdatePaymentScheduleItemRequest body, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { // verify the required parameter 'itemId' is set if (itemId == null) { throw new ApiException("Missing the required parameter 'itemId' when calling updatePaymentScheduleItem(Async)"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling updatePaymentScheduleItem(Async)"); } return updatePaymentScheduleItemCall(itemId, body, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); } /** * Update a payment schedule item * Updates a payment schedule item by ID. **Note:** - The Payment Schedules feature is in the **Early Adopter** phase. We are actively soliciting feedback from a small set of early adopters before releasing it as generally available. To manag](https://knowledgecenter.zuora.com/Zuora_Payments/Payments_Settings/Manage_Features). - This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. - To link a single payment to the payment schedule item, specify the `paymentID` field in the request body and set `zuora-version` to equal to or smaller than `336.0`; To link or unlink multiple payments with the item, specify the `linkPayments` and `unlinkPayments` field in the request body. - The maximum number of payments that are allowed to be linked to a payment schedule item is `10`. - When unlinking and linking payments with the payment schedule item in one request, Zuora will first unlink the linked payments, and then link new payments to the item. * @param itemId The unique ID of a payment schedule item. (required) * @param body (required) * @param acceptEncoding Include the `Accept-Encoding: gzip` header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a `Content-Encoding` header with the compression algorithm so that your client can decompress it. (optional) * @param contentEncoding Include the `Content-Encoding: gzip` header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload. (optional) * @param authorization The value is in the `Bearer {token}` format where {token} is a valid OAuth token generated by calling [Create an OAuth token](https://www.zuora.com/developer/api-references/api/operation/createToken). (optional) * @param zuoraTrackId A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (`:`), semicolon (`;`), double quote (`\"`), and quote (`'`). (optional) * @param zuoraEntityIds An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. (optional) * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @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 PaymentScheduleItemResponse * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ protected PaymentScheduleItemResponse updatePaymentScheduleItem(String itemId, UpdatePaymentScheduleItemRequest body, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds) throws ApiException { ApiResponse localVarResp = updatePaymentScheduleItemWithHttpInfo(itemId, body, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds); return localVarResp.getData(); } private ApiResponse updatePaymentScheduleItemWithHttpInfo(String itemId, UpdatePaymentScheduleItemRequest body, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds) throws ApiException { okhttp3.Call localVarCall = updatePaymentScheduleItemValidateBeforeCall(itemId, body, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call updatePaymentScheduleItemAsync(String itemId, UpdatePaymentScheduleItemRequest body, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updatePaymentScheduleItemValidateBeforeCall(itemId, body, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class UpdatePaymentScheduleItemApi { private final String itemId; private final UpdatePaymentScheduleItemRequest body; private String acceptEncoding; private String contentEncoding; private String authorization; private String zuoraTrackId; private String zuoraEntityIds; private String zuoraVersion; private String zuoraOrgIds; private UpdatePaymentScheduleItemApi(String itemId, UpdatePaymentScheduleItemRequest body) { this.itemId = itemId; this.body = body; } /** * Set acceptEncoding * @param acceptEncoding Include the `Accept-Encoding: gzip` header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a `Content-Encoding` header with the compression algorithm so that your client can decompress it. (optional) * @return UpdatePaymentScheduleItemApi */ public UpdatePaymentScheduleItemApi acceptEncoding(String acceptEncoding) { this.acceptEncoding = acceptEncoding; return this; } /** * Set contentEncoding * @param contentEncoding Include the `Content-Encoding: gzip` header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload. (optional) * @return UpdatePaymentScheduleItemApi */ public UpdatePaymentScheduleItemApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; return this; } /** * Set authorization * @param authorization The value is in the `Bearer {token}` format where {token} is a valid OAuth token generated by calling [Create an OAuth token](https://www.zuora.com/developer/api-references/api/operation/createToken). (optional) * @return UpdatePaymentScheduleItemApi */ public UpdatePaymentScheduleItemApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraTrackId * @param zuoraTrackId A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (`:`), semicolon (`;`), double quote (`\"`), and quote (`'`). (optional) * @return UpdatePaymentScheduleItemApi */ public UpdatePaymentScheduleItemApi zuoraTrackId(String zuoraTrackId) { this.zuoraTrackId = zuoraTrackId; return this; } /** * Set zuoraEntityIds * @param zuoraEntityIds An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. (optional) * @return UpdatePaymentScheduleItemApi */ public UpdatePaymentScheduleItemApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return UpdatePaymentScheduleItemApi */ public UpdatePaymentScheduleItemApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * 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 UpdatePaymentScheduleItemApi */ public UpdatePaymentScheduleItemApi zuoraOrgIds(String zuoraOrgIds) { this.zuoraOrgIds = zuoraOrgIds; return this; } /** * Build call for updatePaymentScheduleItem * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return updatePaymentScheduleItemCall(itemId, body, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); } /** * Execute updatePaymentScheduleItem request * @return PaymentScheduleItemResponse * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public PaymentScheduleItemResponse execute() throws ApiException { ApiResponse localVarResp = updatePaymentScheduleItemWithHttpInfo(itemId, body, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds); return localVarResp.getData(); } /** * Execute updatePaymentScheduleItem request with HTTP info returned * @return ApiResponse<PaymentScheduleItemResponse> * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ private ApiResponse executeWithHttpInfo() throws ApiException { return updatePaymentScheduleItemWithHttpInfo(itemId, body, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds); } /** * Execute updatePaymentScheduleItem 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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return updatePaymentScheduleItemAsync(itemId, body, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); } } /** * Update a payment schedule item * Updates a payment schedule item by ID. **Note:** - The Payment Schedules feature is in the **Early Adopter** phase. We are actively soliciting feedback from a small set of early adopters before releasing it as generally available. To manag](https://knowledgecenter.zuora.com/Zuora_Payments/Payments_Settings/Manage_Features). - This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. - To link a single payment to the payment schedule item, specify the `paymentID` field in the request body and set `zuora-version` to equal to or smaller than `336.0`; To link or unlink multiple payments with the item, specify the `linkPayments` and `unlinkPayments` field in the request body. - The maximum number of payments that are allowed to be linked to a payment schedule item is `10`. - When unlinking and linking payments with the payment schedule item in one request, Zuora will first unlink the linked payments, and then link new payments to the item. * @param itemId The unique ID of a payment schedule item. (required) * @param body (required) * @return UpdatePaymentScheduleItemApi */ public UpdatePaymentScheduleItemApi updatePaymentScheduleItemApi(String itemId, UpdatePaymentScheduleItemRequest body) { return new UpdatePaymentScheduleItemApi(itemId, body); } private okhttp3.Call updatePaymentSchedulePreviewCall(String paymentScheduleKey, PreviewPaymentSchedule body, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, 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 = body; // create path and map variables String localVarPath = "/v1/payment-schedules/{paymentScheduleKey}/preview" .replace("{" + "paymentScheduleKey" + "}", localVarApiClient.escapeString(paymentScheduleKey.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (acceptEncoding != null) { localVarHeaderParams.put("Accept-Encoding", localVarApiClient.parameterToString(acceptEncoding)); } if (contentEncoding != null) { localVarHeaderParams.put("Content-Encoding", localVarApiClient.parameterToString(contentEncoding)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 updatePaymentSchedulePreviewValidateBeforeCall(String paymentScheduleKey, PreviewPaymentSchedule body, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { // verify the required parameter 'paymentScheduleKey' is set if (paymentScheduleKey == null) { throw new ApiException("Missing the required parameter 'paymentScheduleKey' when calling updatePaymentSchedulePreview(Async)"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling updatePaymentSchedulePreview(Async)"); } return updatePaymentSchedulePreviewCall(paymentScheduleKey, body, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); } /** * Preview the result of payment schedule updates * Preview the result of a payment schedule update. This operation only provides a preview. No changes will be made to the database. For custom payment schedules, only the custom fields on the payment schedules can be udpated. Use the [Update a payment schedule item](https://www.zuora.com/developer/api-references/api/tag/Put_PaymentScheduleItem) operation to update payment schedule items of custom payment schedule. Note the following rules for the `periodStartDate`, `period`, and `occurrences`: - If `periodStartDate` is specified, all pending payment schedule items will be rescheduled using this new `periodStartDate`. If `period` is changed, we recommend passing in `periodStartDate`. Otherwise, the system would use the original start date if there is no processed or canceled items, or the last processed or canceled '`scheduleDate` + 1 `period`' as the new `periodStartDate`. - If only `occurrences` is updated, the new item will start with the last processed or canceled '`scheduleDate` + 1 `period`'. **Note:** - The Payment Schedules feature is in the **Early Adopter** phase. We are actively soliciting feedback from a small set of early adopters before releasing it as generally available. To manage and access this feature through the self-service interface, see [Manage Features](https://knowledgecenter.zuora.com/Zuora_Payments/Payments_Settings/Manage_Features) in the Knowledge Center. * @param paymentScheduleKey The unique ID or number of a payment schedule. For example, `8a90857b822459cd018224dcb9eb13be`, or `PS-00000007`. (required) * @param body (required) * @param acceptEncoding Include the `Accept-Encoding: gzip` header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a `Content-Encoding` header with the compression algorithm so that your client can decompress it. (optional) * @param contentEncoding Include the `Content-Encoding: gzip` header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload. (optional) * @param authorization The value is in the `Bearer {token}` format where {token} is a valid OAuth token generated by calling [Create an OAuth token](https://www.zuora.com/developer/api-references/api/operation/createToken). (optional) * @param zuoraTrackId A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (`:`), semicolon (`;`), double quote (`\"`), and quote (`'`). (optional) * @param zuoraEntityIds An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. (optional) * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @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 PaymentScheduleResponse * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ protected PaymentScheduleResponse updatePaymentSchedulePreview(String paymentScheduleKey, PreviewPaymentSchedule body, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds) throws ApiException { ApiResponse localVarResp = updatePaymentSchedulePreviewWithHttpInfo(paymentScheduleKey, body, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds); return localVarResp.getData(); } private ApiResponse updatePaymentSchedulePreviewWithHttpInfo(String paymentScheduleKey, PreviewPaymentSchedule body, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds) throws ApiException { okhttp3.Call localVarCall = updatePaymentSchedulePreviewValidateBeforeCall(paymentScheduleKey, body, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call updatePaymentSchedulePreviewAsync(String paymentScheduleKey, PreviewPaymentSchedule body, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updatePaymentSchedulePreviewValidateBeforeCall(paymentScheduleKey, body, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class UpdatePaymentSchedulePreviewApi { private final String paymentScheduleKey; private final PreviewPaymentSchedule body; private String acceptEncoding; private String contentEncoding; private String authorization; private String zuoraTrackId; private String zuoraEntityIds; private String zuoraVersion; private String zuoraOrgIds; private UpdatePaymentSchedulePreviewApi(String paymentScheduleKey, PreviewPaymentSchedule body) { this.paymentScheduleKey = paymentScheduleKey; this.body = body; } /** * Set acceptEncoding * @param acceptEncoding Include the `Accept-Encoding: gzip` header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a `Content-Encoding` header with the compression algorithm so that your client can decompress it. (optional) * @return UpdatePaymentSchedulePreviewApi */ public UpdatePaymentSchedulePreviewApi acceptEncoding(String acceptEncoding) { this.acceptEncoding = acceptEncoding; return this; } /** * Set contentEncoding * @param contentEncoding Include the `Content-Encoding: gzip` header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload. (optional) * @return UpdatePaymentSchedulePreviewApi */ public UpdatePaymentSchedulePreviewApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; return this; } /** * Set authorization * @param authorization The value is in the `Bearer {token}` format where {token} is a valid OAuth token generated by calling [Create an OAuth token](https://www.zuora.com/developer/api-references/api/operation/createToken). (optional) * @return UpdatePaymentSchedulePreviewApi */ public UpdatePaymentSchedulePreviewApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraTrackId * @param zuoraTrackId A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (`:`), semicolon (`;`), double quote (`\"`), and quote (`'`). (optional) * @return UpdatePaymentSchedulePreviewApi */ public UpdatePaymentSchedulePreviewApi zuoraTrackId(String zuoraTrackId) { this.zuoraTrackId = zuoraTrackId; return this; } /** * Set zuoraEntityIds * @param zuoraEntityIds An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. (optional) * @return UpdatePaymentSchedulePreviewApi */ public UpdatePaymentSchedulePreviewApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return UpdatePaymentSchedulePreviewApi */ public UpdatePaymentSchedulePreviewApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * 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 UpdatePaymentSchedulePreviewApi */ public UpdatePaymentSchedulePreviewApi zuoraOrgIds(String zuoraOrgIds) { this.zuoraOrgIds = zuoraOrgIds; return this; } /** * Build call for updatePaymentSchedulePreview * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return updatePaymentSchedulePreviewCall(paymentScheduleKey, body, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); } /** * Execute updatePaymentSchedulePreview request * @return PaymentScheduleResponse * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public PaymentScheduleResponse execute() throws ApiException { ApiResponse localVarResp = updatePaymentSchedulePreviewWithHttpInfo(paymentScheduleKey, body, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds); return localVarResp.getData(); } /** * Execute updatePaymentSchedulePreview request with HTTP info returned * @return ApiResponse<PaymentScheduleResponse> * @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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ private ApiResponse executeWithHttpInfo() throws ApiException { return updatePaymentSchedulePreviewWithHttpInfo(paymentScheduleKey, body, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds); } /** * Execute updatePaymentSchedulePreview 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 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return updatePaymentSchedulePreviewAsync(paymentScheduleKey, body, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); } } /** * Preview the result of payment schedule updates * Preview the result of a payment schedule update. This operation only provides a preview. No changes will be made to the database. For custom payment schedules, only the custom fields on the payment schedules can be udpated. Use the [Update a payment schedule item](https://www.zuora.com/developer/api-references/api/tag/Put_PaymentScheduleItem) operation to update payment schedule items of custom payment schedule. Note the following rules for the `periodStartDate`, `period`, and `occurrences`: - If `periodStartDate` is specified, all pending payment schedule items will be rescheduled using this new `periodStartDate`. If `period` is changed, we recommend passing in `periodStartDate`. Otherwise, the system would use the original start date if there is no processed or canceled items, or the last processed or canceled '`scheduleDate` + 1 `period`' as the new `periodStartDate`. - If only `occurrences` is updated, the new item will start with the last processed or canceled '`scheduleDate` + 1 `period`'. **Note:** - The Payment Schedules feature is in the **Early Adopter** phase. We are actively soliciting feedback from a small set of early adopters before releasing it as generally available. To manage and access this feature through the self-service interface, see [Manage Features](https://knowledgecenter.zuora.com/Zuora_Payments/Payments_Settings/Manage_Features) in the Knowledge Center. * @param paymentScheduleKey The unique ID or number of a payment schedule. For example, `8a90857b822459cd018224dcb9eb13be`, or `PS-00000007`. (required) * @param body (required) * @return UpdatePaymentSchedulePreviewApi */ public UpdatePaymentSchedulePreviewApi updatePaymentSchedulePreviewApi(String paymentScheduleKey, PreviewPaymentSchedule body) { return new UpdatePaymentSchedulePreviewApi(paymentScheduleKey, body); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy