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

com.zuora.api.ObjectQueriesApi 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.CommonErrorResponse;
import com.zuora.model.ExpandedAccount;
import com.zuora.model.ExpandedAmendment;
import com.zuora.model.ExpandedBillingRun;
import com.zuora.model.ExpandedContact;
import com.zuora.model.ExpandedCreditMemo;
import com.zuora.model.ExpandedCreditMemoApplication;
import com.zuora.model.ExpandedCreditMemoItem;
import com.zuora.model.ExpandedDailyConsumptionSummary;
import com.zuora.model.ExpandedDebitMemo;
import com.zuora.model.ExpandedDebitMemoItem;
import com.zuora.model.ExpandedInvoice;
import com.zuora.model.ExpandedInvoiceItem;
import com.zuora.model.ExpandedOrderAction;
import com.zuora.model.ExpandedOrderLineItem;
import com.zuora.model.ExpandedOrders;
import com.zuora.model.ExpandedPayment;
import com.zuora.model.ExpandedPaymentApplication;
import com.zuora.model.ExpandedPaymentMethod;
import com.zuora.model.ExpandedPaymentMethodSnapshot;
import com.zuora.model.ExpandedPaymentRun;
import com.zuora.model.ExpandedPaymentSchedule;
import com.zuora.model.ExpandedPaymentScheduleItem;
import com.zuora.model.ExpandedPrepaidBalance;
import com.zuora.model.ExpandedPrepaidBalanceFund;
import com.zuora.model.ExpandedPrepaidBalanceTransaction;
import com.zuora.model.ExpandedProcessedUsage;
import com.zuora.model.ExpandedProduct;
import com.zuora.model.ExpandedProductRatePlan;
import com.zuora.model.ExpandedProductRatePlanCharge;
import com.zuora.model.ExpandedProductRatePlanChargeTier;
import com.zuora.model.ExpandedRatePlan;
import com.zuora.model.ExpandedRatePlanCharge;
import com.zuora.model.ExpandedRatePlanChargeTier;
import com.zuora.model.ExpandedRatingResult;
import com.zuora.model.ExpandedRefund;
import com.zuora.model.ExpandedRefundApplication;
import com.zuora.model.ExpandedRefundApplicationItem;
import com.zuora.model.ExpandedSubscription;
import com.zuora.model.ExpandedTaxationItem;
import com.zuora.model.ExpandedUsage;
import com.zuora.model.ExpandedValidityPeriodSummary;
import com.zuora.model.ProxyUnauthorizedResponse;
import com.zuora.model.QueryAccountsResponse;
import com.zuora.model.QueryAmendmentsResponse;
import com.zuora.model.QueryBillingRunsResponse;
import com.zuora.model.QueryContactsResponse;
import com.zuora.model.QueryCreditMemoApplicationsResponse;
import com.zuora.model.QueryCreditMemoItemsResponse;
import com.zuora.model.QueryCreditMemosResponse;
import com.zuora.model.QueryCustomObjectsResponse;
import com.zuora.model.QueryDailyConsumptionSummarysResponse;
import com.zuora.model.QueryDebitMemoItemsResponse;
import com.zuora.model.QueryDebitMemosResponse;
import com.zuora.model.QueryInvoiceItemsResponse;
import com.zuora.model.QueryInvoicesResponse;
import com.zuora.model.QueryOrderActionsResponse;
import com.zuora.model.QueryOrderLineItemsResponse;
import com.zuora.model.QueryOrderssResponse;
import com.zuora.model.QueryPaymentApplicationsResponse;
import com.zuora.model.QueryPaymentMethodSnapshotsResponse;
import com.zuora.model.QueryPaymentMethodsResponse;
import com.zuora.model.QueryPaymentRunsResponse;
import com.zuora.model.QueryPaymentScheduleItemsResponse;
import com.zuora.model.QueryPaymentSchedulesResponse;
import com.zuora.model.QueryPaymentsResponse;
import com.zuora.model.QueryPrepaidBalanceFundsResponse;
import com.zuora.model.QueryPrepaidBalanceTransactionsResponse;
import com.zuora.model.QueryPrepaidBalancesResponse;
import com.zuora.model.QueryProcessedUsagesResponse;
import com.zuora.model.QueryProductRatePlanChargeTiersResponse;
import com.zuora.model.QueryProductRatePlanChargesResponse;
import com.zuora.model.QueryProductRatePlansResponse;
import com.zuora.model.QueryProductsResponse;
import com.zuora.model.QueryRatePlanChargeTiersResponse;
import com.zuora.model.QueryRatePlanChargesResponse;
import com.zuora.model.QueryRatePlansResponse;
import com.zuora.model.QueryRatingResultsResponse;
import com.zuora.model.QueryRefundApplicationItemsResponse;
import com.zuora.model.QueryRefundApplicationsResponse;
import com.zuora.model.QueryRefundsResponse;
import com.zuora.model.QuerySubscriptionsResponse;
import com.zuora.model.QueryTaxationItemsResponse;
import com.zuora.model.QueryUsagesResponse;
import com.zuora.model.QueryValidityPeriodSummarysResponse;

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

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

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

    public ObjectQueriesApi(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 queryAccountByKeyCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/accounts/{key}"
            .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString()));

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

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

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

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

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

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

        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 (zuoraTrackId != null) {
            localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId));
        }

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

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

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

        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 queryAccountByKeyValidateBeforeCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'key' is set
        if (key == null) {
            throw new ApiException("Missing the required parameter 'key' when calling queryAccountByKey(Async)");
        }

        return queryAccountByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback);

    }

            /**
            * 
            * Query Account by key with filters, expands, sort capabilities. Supported expands: billto,soldto,defaultpaymentmethod,subscriptions,payments,refunds,creditmemos,debitmemos,invoices,usages,paymentmethods,subscriptions.rateplans,subscriptions.rateplans.rateplancharges.
                * @param key Object ID or Number. (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 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 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 zuoraVersion The minor version of the Zuora REST API.   (optional, default to 2024-05-20)
                * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional)
                * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional)
                * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional)
                * @param expand Allows you to expand responses by including related object information in a single call. (optional)
                * @param filter A case-sensitive filter on the list. (optional)
                * @return ExpandedAccount
            * @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 OK * 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 ExpandedAccount queryAccountByKey(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryAccountByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryAccountByKeyWithHttpInfo(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryAccountByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryAccountByKeyAsync(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryAccountByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryAccountByKeyApi { private final String key; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryAccountByKeyApi(String key) { this.key = key; } /** * 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 QueryAccountByKeyApi */ public QueryAccountByKeyApi 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 QueryAccountByKeyApi */ public QueryAccountByKeyApi 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 QueryAccountByKeyApi */ public QueryAccountByKeyApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryAccountByKeyApi */ public QueryAccountByKeyApi 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 QueryAccountByKeyApi */ public QueryAccountByKeyApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryAccountByKeyApi */ public QueryAccountByKeyApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryAccountByKeyApi */ public QueryAccountByKeyApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryAccountByKeyApi */ public QueryAccountByKeyApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryAccountByKeyApi */ public QueryAccountByKeyApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryAccountByKeyApi */ public QueryAccountByKeyApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryAccountByKeyApi */ public QueryAccountByKeyApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryAccountByKeyApi */ public QueryAccountByKeyApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryAccountByKey * @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 OK * 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 queryAccountByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryAccountByKey request * @return ExpandedAccount * @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 OK * 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 ExpandedAccount execute() throws ApiException { ApiResponse localVarResp = queryAccountByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryAccountByKey request with HTTP info returned * @return ApiResponse<ExpandedAccount> * @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 OK * 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 queryAccountByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryAccountByKey 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 OK * 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 queryAccountByKeyAsync(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query Account by key with filters, expands, sort capabilities. Supported expands: billto,soldto,defaultpaymentmethod,subscriptions,payments,refunds,creditmemos,debitmemos,invoices,usages,paymentmethods,subscriptions.rateplans,subscriptions.rateplans.rateplancharges. * @param key Object ID or Number. (required) * @return QueryAccountByKeyApi */ public QueryAccountByKeyApi queryAccountByKeyApi(String key) { return new QueryAccountByKeyApi(key); } private okhttp3.Call queryAccountsCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/accounts"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryAccountsValidateBeforeCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { return queryAccountsCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query Accounts with filters, expands, sort capabilities. Supported expands: billto,soldto,defaultpaymentmethod,subscriptions,payments,refunds,creditmemos,debitmemos,invoices,usages,paymentmethods,subscriptions.rateplans,subscriptions.rateplans.rateplancharges. * @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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return QueryAccountsResponse * @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 OK * 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 QueryAccountsResponse queryAccounts(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryAccountsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryAccountsWithHttpInfo(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryAccountsValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryAccountsAsync(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryAccountsValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryAccountsApi { private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryAccountsApi() { } /** * 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 QueryAccountsApi */ public QueryAccountsApi 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 QueryAccountsApi */ public QueryAccountsApi 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 QueryAccountsApi */ public QueryAccountsApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryAccountsApi */ public QueryAccountsApi 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 QueryAccountsApi */ public QueryAccountsApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryAccountsApi */ public QueryAccountsApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryAccountsApi */ public QueryAccountsApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryAccountsApi */ public QueryAccountsApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryAccountsApi */ public QueryAccountsApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryAccountsApi */ public QueryAccountsApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryAccountsApi */ public QueryAccountsApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryAccountsApi */ public QueryAccountsApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryAccounts * @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 OK * 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 queryAccountsCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryAccounts request * @return QueryAccountsResponse * @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 OK * 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 QueryAccountsResponse execute() throws ApiException { ApiResponse localVarResp = queryAccountsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryAccounts request with HTTP info returned * @return ApiResponse<QueryAccountsResponse> * @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 OK * 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 queryAccountsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryAccounts 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 OK * 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 queryAccountsAsync(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query Accounts with filters, expands, sort capabilities. Supported expands: billto,soldto,defaultpaymentmethod,subscriptions,payments,refunds,creditmemos,debitmemos,invoices,usages,paymentmethods,subscriptions.rateplans,subscriptions.rateplans.rateplancharges. * @return QueryAccountsApi */ public QueryAccountsApi queryAccountsApi() { return new QueryAccountsApi(); } private okhttp3.Call queryAmendmentByKeyCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/amendments/{key}" .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryAmendmentByKeyValidateBeforeCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { // verify the required parameter 'key' is set if (key == null) { throw new ApiException("Missing the required parameter 'key' when calling queryAmendmentByKey(Async)"); } return queryAmendmentByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query Amendment by key with filters, expands, sort capabilities. Supported expands: N/A. * @param key Object ID or Number. (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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return ExpandedAmendment * @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 OK * 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 ExpandedAmendment queryAmendmentByKey(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryAmendmentByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryAmendmentByKeyWithHttpInfo(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryAmendmentByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryAmendmentByKeyAsync(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryAmendmentByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryAmendmentByKeyApi { private final String key; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryAmendmentByKeyApi(String key) { this.key = key; } /** * 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 QueryAmendmentByKeyApi */ public QueryAmendmentByKeyApi 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 QueryAmendmentByKeyApi */ public QueryAmendmentByKeyApi 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 QueryAmendmentByKeyApi */ public QueryAmendmentByKeyApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryAmendmentByKeyApi */ public QueryAmendmentByKeyApi 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 QueryAmendmentByKeyApi */ public QueryAmendmentByKeyApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryAmendmentByKeyApi */ public QueryAmendmentByKeyApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryAmendmentByKeyApi */ public QueryAmendmentByKeyApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryAmendmentByKeyApi */ public QueryAmendmentByKeyApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryAmendmentByKeyApi */ public QueryAmendmentByKeyApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryAmendmentByKeyApi */ public QueryAmendmentByKeyApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryAmendmentByKeyApi */ public QueryAmendmentByKeyApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryAmendmentByKeyApi */ public QueryAmendmentByKeyApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryAmendmentByKey * @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 OK * 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 queryAmendmentByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryAmendmentByKey request * @return ExpandedAmendment * @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 OK * 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 ExpandedAmendment execute() throws ApiException { ApiResponse localVarResp = queryAmendmentByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryAmendmentByKey request with HTTP info returned * @return ApiResponse<ExpandedAmendment> * @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 OK * 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 queryAmendmentByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryAmendmentByKey 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 OK * 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 queryAmendmentByKeyAsync(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query Amendment by key with filters, expands, sort capabilities. Supported expands: N/A. * @param key Object ID or Number. (required) * @return QueryAmendmentByKeyApi */ public QueryAmendmentByKeyApi queryAmendmentByKeyApi(String key) { return new QueryAmendmentByKeyApi(key); } private okhttp3.Call queryAmendmentsCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/amendments"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryAmendmentsValidateBeforeCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { return queryAmendmentsCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query Amendments with filters, expands, sort capabilities. Supported expands: N/A. * @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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return QueryAmendmentsResponse * @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 OK * 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 QueryAmendmentsResponse queryAmendments(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryAmendmentsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryAmendmentsWithHttpInfo(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryAmendmentsValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryAmendmentsAsync(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryAmendmentsValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryAmendmentsApi { private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryAmendmentsApi() { } /** * 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 QueryAmendmentsApi */ public QueryAmendmentsApi 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 QueryAmendmentsApi */ public QueryAmendmentsApi 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 QueryAmendmentsApi */ public QueryAmendmentsApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryAmendmentsApi */ public QueryAmendmentsApi 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 QueryAmendmentsApi */ public QueryAmendmentsApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryAmendmentsApi */ public QueryAmendmentsApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryAmendmentsApi */ public QueryAmendmentsApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryAmendmentsApi */ public QueryAmendmentsApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryAmendmentsApi */ public QueryAmendmentsApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryAmendmentsApi */ public QueryAmendmentsApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryAmendmentsApi */ public QueryAmendmentsApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryAmendmentsApi */ public QueryAmendmentsApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryAmendments * @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 OK * 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 queryAmendmentsCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryAmendments request * @return QueryAmendmentsResponse * @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 OK * 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 QueryAmendmentsResponse execute() throws ApiException { ApiResponse localVarResp = queryAmendmentsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryAmendments request with HTTP info returned * @return ApiResponse<QueryAmendmentsResponse> * @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 OK * 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 queryAmendmentsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryAmendments 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 OK * 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 queryAmendmentsAsync(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query Amendments with filters, expands, sort capabilities. Supported expands: N/A. * @return QueryAmendmentsApi */ public QueryAmendmentsApi queryAmendmentsApi() { return new QueryAmendmentsApi(); } private okhttp3.Call queryBillingRunByKeyCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/billing-runs/{key}" .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryBillingRunByKeyValidateBeforeCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { // verify the required parameter 'key' is set if (key == null) { throw new ApiException("Missing the required parameter 'key' when calling queryBillingRunByKey(Async)"); } return queryBillingRunByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query BillingRun by key with filters, expands, sort capabilities. Supported expands: N/A. * @param key Object ID or Number. (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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return ExpandedBillingRun * @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 OK * 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 ExpandedBillingRun queryBillingRunByKey(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryBillingRunByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryBillingRunByKeyWithHttpInfo(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryBillingRunByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryBillingRunByKeyAsync(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryBillingRunByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryBillingRunByKeyApi { private final String key; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryBillingRunByKeyApi(String key) { this.key = key; } /** * 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 QueryBillingRunByKeyApi */ public QueryBillingRunByKeyApi 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 QueryBillingRunByKeyApi */ public QueryBillingRunByKeyApi 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 QueryBillingRunByKeyApi */ public QueryBillingRunByKeyApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryBillingRunByKeyApi */ public QueryBillingRunByKeyApi 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 QueryBillingRunByKeyApi */ public QueryBillingRunByKeyApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryBillingRunByKeyApi */ public QueryBillingRunByKeyApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryBillingRunByKeyApi */ public QueryBillingRunByKeyApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryBillingRunByKeyApi */ public QueryBillingRunByKeyApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryBillingRunByKeyApi */ public QueryBillingRunByKeyApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryBillingRunByKeyApi */ public QueryBillingRunByKeyApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryBillingRunByKeyApi */ public QueryBillingRunByKeyApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryBillingRunByKeyApi */ public QueryBillingRunByKeyApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryBillingRunByKey * @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 OK * 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 queryBillingRunByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryBillingRunByKey request * @return ExpandedBillingRun * @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 OK * 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 ExpandedBillingRun execute() throws ApiException { ApiResponse localVarResp = queryBillingRunByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryBillingRunByKey request with HTTP info returned * @return ApiResponse<ExpandedBillingRun> * @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 OK * 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 queryBillingRunByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryBillingRunByKey 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 OK * 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 queryBillingRunByKeyAsync(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query BillingRun by key with filters, expands, sort capabilities. Supported expands: N/A. * @param key Object ID or Number. (required) * @return QueryBillingRunByKeyApi */ public QueryBillingRunByKeyApi queryBillingRunByKeyApi(String key) { return new QueryBillingRunByKeyApi(key); } private okhttp3.Call queryBillingRunsCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/billing-runs"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryBillingRunsValidateBeforeCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { return queryBillingRunsCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query BillingRuns with filters, expands, sort capabilities. Supported expands: N/A. * @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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return QueryBillingRunsResponse * @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 OK * 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 QueryBillingRunsResponse queryBillingRuns(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryBillingRunsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryBillingRunsWithHttpInfo(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryBillingRunsValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryBillingRunsAsync(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryBillingRunsValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryBillingRunsApi { private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryBillingRunsApi() { } /** * 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 QueryBillingRunsApi */ public QueryBillingRunsApi 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 QueryBillingRunsApi */ public QueryBillingRunsApi 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 QueryBillingRunsApi */ public QueryBillingRunsApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryBillingRunsApi */ public QueryBillingRunsApi 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 QueryBillingRunsApi */ public QueryBillingRunsApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryBillingRunsApi */ public QueryBillingRunsApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryBillingRunsApi */ public QueryBillingRunsApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryBillingRunsApi */ public QueryBillingRunsApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryBillingRunsApi */ public QueryBillingRunsApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryBillingRunsApi */ public QueryBillingRunsApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryBillingRunsApi */ public QueryBillingRunsApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryBillingRunsApi */ public QueryBillingRunsApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryBillingRuns * @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 OK * 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 queryBillingRunsCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryBillingRuns request * @return QueryBillingRunsResponse * @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 OK * 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 QueryBillingRunsResponse execute() throws ApiException { ApiResponse localVarResp = queryBillingRunsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryBillingRuns request with HTTP info returned * @return ApiResponse<QueryBillingRunsResponse> * @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 OK * 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 queryBillingRunsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryBillingRuns 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 OK * 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 queryBillingRunsAsync(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query BillingRuns with filters, expands, sort capabilities. Supported expands: N/A. * @return QueryBillingRunsApi */ public QueryBillingRunsApi queryBillingRunsApi() { return new QueryBillingRunsApi(); } private okhttp3.Call queryContactByKeyCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/contacts/{key}" .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryContactByKeyValidateBeforeCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { // verify the required parameter 'key' is set if (key == null) { throw new ApiException("Missing the required parameter 'key' when calling queryContactByKey(Async)"); } return queryContactByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query Contact by key with filters, expands, sort capabilities. Supported expands: N/A. * @param key Object ID or Number. (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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return ExpandedContact * @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 OK * 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 ExpandedContact queryContactByKey(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryContactByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryContactByKeyWithHttpInfo(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryContactByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryContactByKeyAsync(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryContactByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryContactByKeyApi { private final String key; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryContactByKeyApi(String key) { this.key = key; } /** * 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 QueryContactByKeyApi */ public QueryContactByKeyApi 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 QueryContactByKeyApi */ public QueryContactByKeyApi 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 QueryContactByKeyApi */ public QueryContactByKeyApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryContactByKeyApi */ public QueryContactByKeyApi 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 QueryContactByKeyApi */ public QueryContactByKeyApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryContactByKeyApi */ public QueryContactByKeyApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryContactByKeyApi */ public QueryContactByKeyApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryContactByKeyApi */ public QueryContactByKeyApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryContactByKeyApi */ public QueryContactByKeyApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryContactByKeyApi */ public QueryContactByKeyApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryContactByKeyApi */ public QueryContactByKeyApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryContactByKeyApi */ public QueryContactByKeyApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryContactByKey * @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 OK * 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 queryContactByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryContactByKey request * @return ExpandedContact * @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 OK * 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 ExpandedContact execute() throws ApiException { ApiResponse localVarResp = queryContactByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryContactByKey request with HTTP info returned * @return ApiResponse<ExpandedContact> * @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 OK * 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 queryContactByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryContactByKey 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 OK * 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 queryContactByKeyAsync(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query Contact by key with filters, expands, sort capabilities. Supported expands: N/A. * @param key Object ID or Number. (required) * @return QueryContactByKeyApi */ public QueryContactByKeyApi queryContactByKeyApi(String key) { return new QueryContactByKeyApi(key); } private okhttp3.Call queryContactsCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/contacts"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryContactsValidateBeforeCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { return queryContactsCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query Contacts with filters, expands, sort capabilities. Supported expands: N/A. * @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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return QueryContactsResponse * @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 OK * 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 QueryContactsResponse queryContacts(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryContactsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryContactsWithHttpInfo(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryContactsValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryContactsAsync(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryContactsValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryContactsApi { private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryContactsApi() { } /** * 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 QueryContactsApi */ public QueryContactsApi 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 QueryContactsApi */ public QueryContactsApi 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 QueryContactsApi */ public QueryContactsApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryContactsApi */ public QueryContactsApi 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 QueryContactsApi */ public QueryContactsApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryContactsApi */ public QueryContactsApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryContactsApi */ public QueryContactsApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryContactsApi */ public QueryContactsApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryContactsApi */ public QueryContactsApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryContactsApi */ public QueryContactsApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryContactsApi */ public QueryContactsApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryContactsApi */ public QueryContactsApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryContacts * @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 OK * 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 queryContactsCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryContacts request * @return QueryContactsResponse * @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 OK * 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 QueryContactsResponse execute() throws ApiException { ApiResponse localVarResp = queryContactsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryContacts request with HTTP info returned * @return ApiResponse<QueryContactsResponse> * @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 OK * 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 queryContactsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryContacts 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 OK * 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 queryContactsAsync(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query Contacts with filters, expands, sort capabilities. Supported expands: N/A. * @return QueryContactsApi */ public QueryContactsApi queryContactsApi() { return new QueryContactsApi(); } private okhttp3.Call queryCreditMemoApplicationByKeyCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/credit-memo-applications/{key}" .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryCreditMemoApplicationByKeyValidateBeforeCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { // verify the required parameter 'key' is set if (key == null) { throw new ApiException("Missing the required parameter 'key' when calling queryCreditMemoApplicationByKey(Async)"); } return queryCreditMemoApplicationByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query CreditMemoApplication by key with filters, expands, sort capabilities. Supported expands: creditmemo. * @param key Object ID or Number. (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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return ExpandedCreditMemoApplication * @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 OK * 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 ExpandedCreditMemoApplication queryCreditMemoApplicationByKey(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryCreditMemoApplicationByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryCreditMemoApplicationByKeyWithHttpInfo(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryCreditMemoApplicationByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryCreditMemoApplicationByKeyAsync(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryCreditMemoApplicationByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryCreditMemoApplicationByKeyApi { private final String key; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryCreditMemoApplicationByKeyApi(String key) { this.key = key; } /** * 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 QueryCreditMemoApplicationByKeyApi */ public QueryCreditMemoApplicationByKeyApi 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 QueryCreditMemoApplicationByKeyApi */ public QueryCreditMemoApplicationByKeyApi 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 QueryCreditMemoApplicationByKeyApi */ public QueryCreditMemoApplicationByKeyApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryCreditMemoApplicationByKeyApi */ public QueryCreditMemoApplicationByKeyApi 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 QueryCreditMemoApplicationByKeyApi */ public QueryCreditMemoApplicationByKeyApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryCreditMemoApplicationByKeyApi */ public QueryCreditMemoApplicationByKeyApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryCreditMemoApplicationByKeyApi */ public QueryCreditMemoApplicationByKeyApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryCreditMemoApplicationByKeyApi */ public QueryCreditMemoApplicationByKeyApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryCreditMemoApplicationByKeyApi */ public QueryCreditMemoApplicationByKeyApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryCreditMemoApplicationByKeyApi */ public QueryCreditMemoApplicationByKeyApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryCreditMemoApplicationByKeyApi */ public QueryCreditMemoApplicationByKeyApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryCreditMemoApplicationByKeyApi */ public QueryCreditMemoApplicationByKeyApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryCreditMemoApplicationByKey * @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 OK * 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 queryCreditMemoApplicationByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryCreditMemoApplicationByKey request * @return ExpandedCreditMemoApplication * @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 OK * 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 ExpandedCreditMemoApplication execute() throws ApiException { ApiResponse localVarResp = queryCreditMemoApplicationByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryCreditMemoApplicationByKey request with HTTP info returned * @return ApiResponse<ExpandedCreditMemoApplication> * @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 OK * 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 queryCreditMemoApplicationByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryCreditMemoApplicationByKey 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 OK * 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 queryCreditMemoApplicationByKeyAsync(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query CreditMemoApplication by key with filters, expands, sort capabilities. Supported expands: creditmemo. * @param key Object ID or Number. (required) * @return QueryCreditMemoApplicationByKeyApi */ public QueryCreditMemoApplicationByKeyApi queryCreditMemoApplicationByKeyApi(String key) { return new QueryCreditMemoApplicationByKeyApi(key); } private okhttp3.Call queryCreditMemoApplicationsCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/credit-memo-applications"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryCreditMemoApplicationsValidateBeforeCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { return queryCreditMemoApplicationsCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query CreditMemoApplications with filters, expands, sort capabilities. Supported expands: creditmemo. * @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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return QueryCreditMemoApplicationsResponse * @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 OK * 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 QueryCreditMemoApplicationsResponse queryCreditMemoApplications(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryCreditMemoApplicationsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryCreditMemoApplicationsWithHttpInfo(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryCreditMemoApplicationsValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryCreditMemoApplicationsAsync(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryCreditMemoApplicationsValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryCreditMemoApplicationsApi { private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryCreditMemoApplicationsApi() { } /** * 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 QueryCreditMemoApplicationsApi */ public QueryCreditMemoApplicationsApi 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 QueryCreditMemoApplicationsApi */ public QueryCreditMemoApplicationsApi 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 QueryCreditMemoApplicationsApi */ public QueryCreditMemoApplicationsApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryCreditMemoApplicationsApi */ public QueryCreditMemoApplicationsApi 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 QueryCreditMemoApplicationsApi */ public QueryCreditMemoApplicationsApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryCreditMemoApplicationsApi */ public QueryCreditMemoApplicationsApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryCreditMemoApplicationsApi */ public QueryCreditMemoApplicationsApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryCreditMemoApplicationsApi */ public QueryCreditMemoApplicationsApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryCreditMemoApplicationsApi */ public QueryCreditMemoApplicationsApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryCreditMemoApplicationsApi */ public QueryCreditMemoApplicationsApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryCreditMemoApplicationsApi */ public QueryCreditMemoApplicationsApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryCreditMemoApplicationsApi */ public QueryCreditMemoApplicationsApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryCreditMemoApplications * @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 OK * 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 queryCreditMemoApplicationsCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryCreditMemoApplications request * @return QueryCreditMemoApplicationsResponse * @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 OK * 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 QueryCreditMemoApplicationsResponse execute() throws ApiException { ApiResponse localVarResp = queryCreditMemoApplicationsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryCreditMemoApplications request with HTTP info returned * @return ApiResponse<QueryCreditMemoApplicationsResponse> * @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 OK * 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 queryCreditMemoApplicationsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryCreditMemoApplications 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 OK * 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 queryCreditMemoApplicationsAsync(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query CreditMemoApplications with filters, expands, sort capabilities. Supported expands: creditmemo. * @return QueryCreditMemoApplicationsApi */ public QueryCreditMemoApplicationsApi queryCreditMemoApplicationsApi() { return new QueryCreditMemoApplicationsApi(); } private okhttp3.Call queryCreditMemoByKeyCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/credit-memos/{key}" .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryCreditMemoByKeyValidateBeforeCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { // verify the required parameter 'key' is set if (key == null) { throw new ApiException("Missing the required parameter 'key' when calling queryCreditMemoByKey(Async)"); } return queryCreditMemoByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query CreditMemo by key with filters, expands, sort capabilities. Supported expands: account,billtocontact,creditmemoitems,creditmemoitems.subscription,creditmemoitems.subscription.account,creditmemoapplications. * @param key Object ID or Number. (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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return ExpandedCreditMemo * @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 OK * 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 ExpandedCreditMemo queryCreditMemoByKey(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryCreditMemoByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryCreditMemoByKeyWithHttpInfo(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryCreditMemoByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryCreditMemoByKeyAsync(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryCreditMemoByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryCreditMemoByKeyApi { private final String key; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryCreditMemoByKeyApi(String key) { this.key = key; } /** * 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 QueryCreditMemoByKeyApi */ public QueryCreditMemoByKeyApi 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 QueryCreditMemoByKeyApi */ public QueryCreditMemoByKeyApi 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 QueryCreditMemoByKeyApi */ public QueryCreditMemoByKeyApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryCreditMemoByKeyApi */ public QueryCreditMemoByKeyApi 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 QueryCreditMemoByKeyApi */ public QueryCreditMemoByKeyApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryCreditMemoByKeyApi */ public QueryCreditMemoByKeyApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryCreditMemoByKeyApi */ public QueryCreditMemoByKeyApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryCreditMemoByKeyApi */ public QueryCreditMemoByKeyApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryCreditMemoByKeyApi */ public QueryCreditMemoByKeyApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryCreditMemoByKeyApi */ public QueryCreditMemoByKeyApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryCreditMemoByKeyApi */ public QueryCreditMemoByKeyApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryCreditMemoByKeyApi */ public QueryCreditMemoByKeyApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryCreditMemoByKey * @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 OK * 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 queryCreditMemoByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryCreditMemoByKey request * @return ExpandedCreditMemo * @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 OK * 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 ExpandedCreditMemo execute() throws ApiException { ApiResponse localVarResp = queryCreditMemoByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryCreditMemoByKey request with HTTP info returned * @return ApiResponse<ExpandedCreditMemo> * @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 OK * 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 queryCreditMemoByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryCreditMemoByKey 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 OK * 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 queryCreditMemoByKeyAsync(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query CreditMemo by key with filters, expands, sort capabilities. Supported expands: account,billtocontact,creditmemoitems,creditmemoitems.subscription,creditmemoitems.subscription.account,creditmemoapplications. * @param key Object ID or Number. (required) * @return QueryCreditMemoByKeyApi */ public QueryCreditMemoByKeyApi queryCreditMemoByKeyApi(String key) { return new QueryCreditMemoByKeyApi(key); } private okhttp3.Call queryCreditMemoItemByKeyCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/credit-memo-items/{key}" .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryCreditMemoItemByKeyValidateBeforeCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { // verify the required parameter 'key' is set if (key == null) { throw new ApiException("Missing the required parameter 'key' when calling queryCreditMemoItemByKey(Async)"); } return queryCreditMemoItemByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query CreditMemoItem by key with filters, expands, sort capabilities. Supported expands: subscription,rateplancharge. * @param key Object ID or Number. (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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return ExpandedCreditMemoItem * @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 OK * 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 ExpandedCreditMemoItem queryCreditMemoItemByKey(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryCreditMemoItemByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryCreditMemoItemByKeyWithHttpInfo(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryCreditMemoItemByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryCreditMemoItemByKeyAsync(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryCreditMemoItemByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryCreditMemoItemByKeyApi { private final String key; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryCreditMemoItemByKeyApi(String key) { this.key = key; } /** * 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 QueryCreditMemoItemByKeyApi */ public QueryCreditMemoItemByKeyApi 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 QueryCreditMemoItemByKeyApi */ public QueryCreditMemoItemByKeyApi 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 QueryCreditMemoItemByKeyApi */ public QueryCreditMemoItemByKeyApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryCreditMemoItemByKeyApi */ public QueryCreditMemoItemByKeyApi 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 QueryCreditMemoItemByKeyApi */ public QueryCreditMemoItemByKeyApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryCreditMemoItemByKeyApi */ public QueryCreditMemoItemByKeyApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryCreditMemoItemByKeyApi */ public QueryCreditMemoItemByKeyApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryCreditMemoItemByKeyApi */ public QueryCreditMemoItemByKeyApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryCreditMemoItemByKeyApi */ public QueryCreditMemoItemByKeyApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryCreditMemoItemByKeyApi */ public QueryCreditMemoItemByKeyApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryCreditMemoItemByKeyApi */ public QueryCreditMemoItemByKeyApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryCreditMemoItemByKeyApi */ public QueryCreditMemoItemByKeyApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryCreditMemoItemByKey * @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 OK * 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 queryCreditMemoItemByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryCreditMemoItemByKey request * @return ExpandedCreditMemoItem * @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 OK * 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 ExpandedCreditMemoItem execute() throws ApiException { ApiResponse localVarResp = queryCreditMemoItemByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryCreditMemoItemByKey request with HTTP info returned * @return ApiResponse<ExpandedCreditMemoItem> * @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 OK * 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 queryCreditMemoItemByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryCreditMemoItemByKey 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 OK * 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 queryCreditMemoItemByKeyAsync(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query CreditMemoItem by key with filters, expands, sort capabilities. Supported expands: subscription,rateplancharge. * @param key Object ID or Number. (required) * @return QueryCreditMemoItemByKeyApi */ public QueryCreditMemoItemByKeyApi queryCreditMemoItemByKeyApi(String key) { return new QueryCreditMemoItemByKeyApi(key); } private okhttp3.Call queryCreditMemoItemsCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/credit-memo-items"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryCreditMemoItemsValidateBeforeCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { return queryCreditMemoItemsCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query CreditMemoItems with filters, expands, sort capabilities. Supported expands: subscription,rateplancharge. * @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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return QueryCreditMemoItemsResponse * @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 OK * 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 QueryCreditMemoItemsResponse queryCreditMemoItems(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryCreditMemoItemsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryCreditMemoItemsWithHttpInfo(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryCreditMemoItemsValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryCreditMemoItemsAsync(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryCreditMemoItemsValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryCreditMemoItemsApi { private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryCreditMemoItemsApi() { } /** * 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 QueryCreditMemoItemsApi */ public QueryCreditMemoItemsApi 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 QueryCreditMemoItemsApi */ public QueryCreditMemoItemsApi 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 QueryCreditMemoItemsApi */ public QueryCreditMemoItemsApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryCreditMemoItemsApi */ public QueryCreditMemoItemsApi 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 QueryCreditMemoItemsApi */ public QueryCreditMemoItemsApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryCreditMemoItemsApi */ public QueryCreditMemoItemsApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryCreditMemoItemsApi */ public QueryCreditMemoItemsApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryCreditMemoItemsApi */ public QueryCreditMemoItemsApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryCreditMemoItemsApi */ public QueryCreditMemoItemsApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryCreditMemoItemsApi */ public QueryCreditMemoItemsApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryCreditMemoItemsApi */ public QueryCreditMemoItemsApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryCreditMemoItemsApi */ public QueryCreditMemoItemsApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryCreditMemoItems * @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 OK * 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 queryCreditMemoItemsCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryCreditMemoItems request * @return QueryCreditMemoItemsResponse * @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 OK * 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 QueryCreditMemoItemsResponse execute() throws ApiException { ApiResponse localVarResp = queryCreditMemoItemsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryCreditMemoItems request with HTTP info returned * @return ApiResponse<QueryCreditMemoItemsResponse> * @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 OK * 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 queryCreditMemoItemsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryCreditMemoItems 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 OK * 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 queryCreditMemoItemsAsync(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query CreditMemoItems with filters, expands, sort capabilities. Supported expands: subscription,rateplancharge. * @return QueryCreditMemoItemsApi */ public QueryCreditMemoItemsApi queryCreditMemoItemsApi() { return new QueryCreditMemoItemsApi(); } private okhttp3.Call queryCreditMemosCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/credit-memos"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryCreditMemosValidateBeforeCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { return queryCreditMemosCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query CreditMemos with filters, expands, sort capabilities. Supported expands: account,billtocontact,creditmemoitems,creditmemoitems.subscription,creditmemoitems.subscription.account,creditmemoapplications. * @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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return QueryCreditMemosResponse * @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 OK * 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 QueryCreditMemosResponse queryCreditMemos(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryCreditMemosWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryCreditMemosWithHttpInfo(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryCreditMemosValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryCreditMemosAsync(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryCreditMemosValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryCreditMemosApi { private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryCreditMemosApi() { } /** * 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 QueryCreditMemosApi */ public QueryCreditMemosApi 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 QueryCreditMemosApi */ public QueryCreditMemosApi 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 QueryCreditMemosApi */ public QueryCreditMemosApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryCreditMemosApi */ public QueryCreditMemosApi 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 QueryCreditMemosApi */ public QueryCreditMemosApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryCreditMemosApi */ public QueryCreditMemosApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryCreditMemosApi */ public QueryCreditMemosApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryCreditMemosApi */ public QueryCreditMemosApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryCreditMemosApi */ public QueryCreditMemosApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryCreditMemosApi */ public QueryCreditMemosApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryCreditMemosApi */ public QueryCreditMemosApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryCreditMemosApi */ public QueryCreditMemosApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryCreditMemos * @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 OK * 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 queryCreditMemosCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryCreditMemos request * @return QueryCreditMemosResponse * @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 OK * 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 QueryCreditMemosResponse execute() throws ApiException { ApiResponse localVarResp = queryCreditMemosWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryCreditMemos request with HTTP info returned * @return ApiResponse<QueryCreditMemosResponse> * @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 OK * 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 queryCreditMemosWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryCreditMemos 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 OK * 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 queryCreditMemosAsync(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query CreditMemos with filters, expands, sort capabilities. Supported expands: account,billtocontact,creditmemoitems,creditmemoitems.subscription,creditmemoitems.subscription.account,creditmemoapplications. * @return QueryCreditMemosApi */ public QueryCreditMemosApi queryCreditMemosApi() { return new QueryCreditMemosApi(); } private okhttp3.Call queryCustomObjectBykeyCall(String customObjectName, String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/{custom-object-name}/{key}" .replace("{" + "custom-object-name" + "}", localVarApiClient.escapeString(customObjectName.toString())) .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_size", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryCustomObjectBykeyValidateBeforeCall(String customObjectName, String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { // verify the required parameter 'customObjectName' is set if (customObjectName == null) { throw new ApiException("Missing the required parameter 'customObjectName' when calling queryCustomObjectBykey(Async)"); } // verify the required parameter 'key' is set if (key == null) { throw new ApiException("Missing the required parameter 'key' when calling queryCustomObjectBykey(Async)"); } return queryCustomObjectBykeyCall(customObjectName, key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query Custom Object by key with filters, expands, sort capabilities. Custom Object name is {namespace}__{objectname}s, e.g. default__cars * @param customObjectName Custom Object Name with NameSpace, e.g. default__cars (required) * @param key Object ID. (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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return Map<String, Object> * @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 OK * 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 Map queryCustomObjectBykey(String customObjectName, String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse> localVarResp = queryCustomObjectBykeyWithHttpInfo(customObjectName, key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse> queryCustomObjectBykeyWithHttpInfo(String customObjectName, String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryCustomObjectBykeyValidateBeforeCall(customObjectName, key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryCustomObjectBykeyAsync(String customObjectName, String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = queryCustomObjectBykeyValidateBeforeCall(customObjectName, key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryCustomObjectBykeyApi { private final String customObjectName; private final String key; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryCustomObjectBykeyApi(String customObjectName, String key) { this.customObjectName = customObjectName; this.key = key; } /** * 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 QueryCustomObjectBykeyApi */ public QueryCustomObjectBykeyApi 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 QueryCustomObjectBykeyApi */ public QueryCustomObjectBykeyApi 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 QueryCustomObjectBykeyApi */ public QueryCustomObjectBykeyApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryCustomObjectBykeyApi */ public QueryCustomObjectBykeyApi 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 QueryCustomObjectBykeyApi */ public QueryCustomObjectBykeyApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryCustomObjectBykeyApi */ public QueryCustomObjectBykeyApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryCustomObjectBykeyApi */ public QueryCustomObjectBykeyApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryCustomObjectBykeyApi */ public QueryCustomObjectBykeyApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryCustomObjectBykeyApi */ public QueryCustomObjectBykeyApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryCustomObjectBykeyApi */ public QueryCustomObjectBykeyApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryCustomObjectBykeyApi */ public QueryCustomObjectBykeyApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryCustomObjectBykeyApi */ public QueryCustomObjectBykeyApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryCustomObjectBykey * @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 OK * 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 queryCustomObjectBykeyCall(customObjectName, key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryCustomObjectBykey request * @return Map<String, Object> * @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 OK * 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 Map execute() throws ApiException { ApiResponse> localVarResp = queryCustomObjectBykeyWithHttpInfo(customObjectName, key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryCustomObjectBykey request with HTTP info returned * @return ApiResponse<Map<String, Object>> * @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 OK * 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 queryCustomObjectBykeyWithHttpInfo(customObjectName, key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryCustomObjectBykey 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 OK * 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 queryCustomObjectBykeyAsync(customObjectName, key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query Custom Object by key with filters, expands, sort capabilities. Custom Object name is {namespace}__{objectname}s, e.g. default__cars * @param customObjectName Custom Object Name with NameSpace, e.g. default__cars (required) * @param key Object ID. (required) * @return QueryCustomObjectBykeyApi */ public QueryCustomObjectBykeyApi queryCustomObjectBykeyApi(String customObjectName, String key) { return new QueryCustomObjectBykeyApi(customObjectName, key); } private okhttp3.Call queryCustomObjectsCall(String customObjectName, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/{custom-object-name}" .replace("{" + "custom-object-name" + "}", localVarApiClient.escapeString(customObjectName.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryCustomObjectsValidateBeforeCall(String customObjectName, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { // verify the required parameter 'customObjectName' is set if (customObjectName == null) { throw new ApiException("Missing the required parameter 'customObjectName' when calling queryCustomObjects(Async)"); } return queryCustomObjectsCall(customObjectName, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query Custom Objects with filters, expands, sort capabilities. Custom Object name is {namespace}__{objectname}s, e.g. default_cars * @param customObjectName Custom Object Name with NameSpace, e.g. default__cars (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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return QueryCustomObjectsResponse * @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 OK * 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 QueryCustomObjectsResponse queryCustomObjects(String customObjectName, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryCustomObjectsWithHttpInfo(customObjectName, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryCustomObjectsWithHttpInfo(String customObjectName, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryCustomObjectsValidateBeforeCall(customObjectName, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryCustomObjectsAsync(String customObjectName, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryCustomObjectsValidateBeforeCall(customObjectName, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryCustomObjectsApi { private final String customObjectName; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryCustomObjectsApi(String customObjectName) { this.customObjectName = customObjectName; } /** * 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 QueryCustomObjectsApi */ public QueryCustomObjectsApi 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 QueryCustomObjectsApi */ public QueryCustomObjectsApi 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 QueryCustomObjectsApi */ public QueryCustomObjectsApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryCustomObjectsApi */ public QueryCustomObjectsApi 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 QueryCustomObjectsApi */ public QueryCustomObjectsApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryCustomObjectsApi */ public QueryCustomObjectsApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryCustomObjectsApi */ public QueryCustomObjectsApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryCustomObjectsApi */ public QueryCustomObjectsApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryCustomObjectsApi */ public QueryCustomObjectsApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryCustomObjectsApi */ public QueryCustomObjectsApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryCustomObjectsApi */ public QueryCustomObjectsApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryCustomObjectsApi */ public QueryCustomObjectsApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryCustomObjects * @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 OK * 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 queryCustomObjectsCall(customObjectName, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryCustomObjects request * @return QueryCustomObjectsResponse * @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 OK * 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 QueryCustomObjectsResponse execute() throws ApiException { ApiResponse localVarResp = queryCustomObjectsWithHttpInfo(customObjectName, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryCustomObjects request with HTTP info returned * @return ApiResponse<QueryCustomObjectsResponse> * @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 OK * 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 queryCustomObjectsWithHttpInfo(customObjectName, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryCustomObjects 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 OK * 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 queryCustomObjectsAsync(customObjectName, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query Custom Objects with filters, expands, sort capabilities. Custom Object name is {namespace}__{objectname}s, e.g. default_cars * @param customObjectName Custom Object Name with NameSpace, e.g. default__cars (required) * @return QueryCustomObjectsApi */ public QueryCustomObjectsApi queryCustomObjectsApi(String customObjectName) { return new QueryCustomObjectsApi(customObjectName); } private okhttp3.Call queryDailyConsumptionSummaryByKeyCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/daily-consumption-summaries/{key}" .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryDailyConsumptionSummaryByKeyValidateBeforeCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { // verify the required parameter 'key' is set if (key == null) { throw new ApiException("Missing the required parameter 'key' when calling queryDailyConsumptionSummaryByKey(Async)"); } return queryDailyConsumptionSummaryByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query DailyConsumptionSummary by key with filters, expands, sort capabilities. Supported expands: N/A. * @param key Object ID or Number. (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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return ExpandedDailyConsumptionSummary * @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 OK * 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 ExpandedDailyConsumptionSummary queryDailyConsumptionSummaryByKey(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryDailyConsumptionSummaryByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryDailyConsumptionSummaryByKeyWithHttpInfo(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryDailyConsumptionSummaryByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryDailyConsumptionSummaryByKeyAsync(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryDailyConsumptionSummaryByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryDailyConsumptionSummaryByKeyApi { private final String key; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryDailyConsumptionSummaryByKeyApi(String key) { this.key = key; } /** * 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 QueryDailyConsumptionSummaryByKeyApi */ public QueryDailyConsumptionSummaryByKeyApi 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 QueryDailyConsumptionSummaryByKeyApi */ public QueryDailyConsumptionSummaryByKeyApi 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 QueryDailyConsumptionSummaryByKeyApi */ public QueryDailyConsumptionSummaryByKeyApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryDailyConsumptionSummaryByKeyApi */ public QueryDailyConsumptionSummaryByKeyApi 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 QueryDailyConsumptionSummaryByKeyApi */ public QueryDailyConsumptionSummaryByKeyApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryDailyConsumptionSummaryByKeyApi */ public QueryDailyConsumptionSummaryByKeyApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryDailyConsumptionSummaryByKeyApi */ public QueryDailyConsumptionSummaryByKeyApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryDailyConsumptionSummaryByKeyApi */ public QueryDailyConsumptionSummaryByKeyApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryDailyConsumptionSummaryByKeyApi */ public QueryDailyConsumptionSummaryByKeyApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryDailyConsumptionSummaryByKeyApi */ public QueryDailyConsumptionSummaryByKeyApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryDailyConsumptionSummaryByKeyApi */ public QueryDailyConsumptionSummaryByKeyApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryDailyConsumptionSummaryByKeyApi */ public QueryDailyConsumptionSummaryByKeyApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryDailyConsumptionSummaryByKey * @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 OK * 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 queryDailyConsumptionSummaryByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryDailyConsumptionSummaryByKey request * @return ExpandedDailyConsumptionSummary * @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 OK * 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 ExpandedDailyConsumptionSummary execute() throws ApiException { ApiResponse localVarResp = queryDailyConsumptionSummaryByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryDailyConsumptionSummaryByKey request with HTTP info returned * @return ApiResponse<ExpandedDailyConsumptionSummary> * @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 OK * 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 queryDailyConsumptionSummaryByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryDailyConsumptionSummaryByKey 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 OK * 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 queryDailyConsumptionSummaryByKeyAsync(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query DailyConsumptionSummary by key with filters, expands, sort capabilities. Supported expands: N/A. * @param key Object ID or Number. (required) * @return QueryDailyConsumptionSummaryByKeyApi */ public QueryDailyConsumptionSummaryByKeyApi queryDailyConsumptionSummaryByKeyApi(String key) { return new QueryDailyConsumptionSummaryByKeyApi(key); } private okhttp3.Call queryDailyConsumptionSummarysCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/daily-consumption-summaries"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryDailyConsumptionSummarysValidateBeforeCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { return queryDailyConsumptionSummarysCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query DailyConsumptionSummarys with filters, expands, sort capabilities. Supported expands: N/A. * @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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return QueryDailyConsumptionSummarysResponse * @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 OK * 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 QueryDailyConsumptionSummarysResponse queryDailyConsumptionSummarys(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryDailyConsumptionSummarysWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryDailyConsumptionSummarysWithHttpInfo(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryDailyConsumptionSummarysValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryDailyConsumptionSummarysAsync(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryDailyConsumptionSummarysValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryDailyConsumptionSummarysApi { private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryDailyConsumptionSummarysApi() { } /** * 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 QueryDailyConsumptionSummarysApi */ public QueryDailyConsumptionSummarysApi 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 QueryDailyConsumptionSummarysApi */ public QueryDailyConsumptionSummarysApi 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 QueryDailyConsumptionSummarysApi */ public QueryDailyConsumptionSummarysApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryDailyConsumptionSummarysApi */ public QueryDailyConsumptionSummarysApi 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 QueryDailyConsumptionSummarysApi */ public QueryDailyConsumptionSummarysApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryDailyConsumptionSummarysApi */ public QueryDailyConsumptionSummarysApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryDailyConsumptionSummarysApi */ public QueryDailyConsumptionSummarysApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryDailyConsumptionSummarysApi */ public QueryDailyConsumptionSummarysApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryDailyConsumptionSummarysApi */ public QueryDailyConsumptionSummarysApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryDailyConsumptionSummarysApi */ public QueryDailyConsumptionSummarysApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryDailyConsumptionSummarysApi */ public QueryDailyConsumptionSummarysApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryDailyConsumptionSummarysApi */ public QueryDailyConsumptionSummarysApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryDailyConsumptionSummarys * @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 OK * 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 queryDailyConsumptionSummarysCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryDailyConsumptionSummarys request * @return QueryDailyConsumptionSummarysResponse * @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 OK * 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 QueryDailyConsumptionSummarysResponse execute() throws ApiException { ApiResponse localVarResp = queryDailyConsumptionSummarysWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryDailyConsumptionSummarys request with HTTP info returned * @return ApiResponse<QueryDailyConsumptionSummarysResponse> * @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 OK * 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 queryDailyConsumptionSummarysWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryDailyConsumptionSummarys 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 OK * 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 queryDailyConsumptionSummarysAsync(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query DailyConsumptionSummarys with filters, expands, sort capabilities. Supported expands: N/A. * @return QueryDailyConsumptionSummarysApi */ public QueryDailyConsumptionSummarysApi queryDailyConsumptionSummarysApi() { return new QueryDailyConsumptionSummarysApi(); } private okhttp3.Call queryDebitMemoByKeyCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/debit-memos/{key}" .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryDebitMemoByKeyValidateBeforeCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { // verify the required parameter 'key' is set if (key == null) { throw new ApiException("Missing the required parameter 'key' when calling queryDebitMemoByKey(Async)"); } return queryDebitMemoByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query DebitMemo by key with filters, expands, sort capabilities. Supported expands: account,billtocontact,debitmemoitems,debitmemoitems.subscription,debitmemoitems.subscription.account. * @param key Object ID or Number. (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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return ExpandedDebitMemo * @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 OK * 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 ExpandedDebitMemo queryDebitMemoByKey(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryDebitMemoByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryDebitMemoByKeyWithHttpInfo(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryDebitMemoByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryDebitMemoByKeyAsync(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryDebitMemoByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryDebitMemoByKeyApi { private final String key; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryDebitMemoByKeyApi(String key) { this.key = key; } /** * 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 QueryDebitMemoByKeyApi */ public QueryDebitMemoByKeyApi 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 QueryDebitMemoByKeyApi */ public QueryDebitMemoByKeyApi 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 QueryDebitMemoByKeyApi */ public QueryDebitMemoByKeyApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryDebitMemoByKeyApi */ public QueryDebitMemoByKeyApi 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 QueryDebitMemoByKeyApi */ public QueryDebitMemoByKeyApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryDebitMemoByKeyApi */ public QueryDebitMemoByKeyApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryDebitMemoByKeyApi */ public QueryDebitMemoByKeyApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryDebitMemoByKeyApi */ public QueryDebitMemoByKeyApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryDebitMemoByKeyApi */ public QueryDebitMemoByKeyApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryDebitMemoByKeyApi */ public QueryDebitMemoByKeyApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryDebitMemoByKeyApi */ public QueryDebitMemoByKeyApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryDebitMemoByKeyApi */ public QueryDebitMemoByKeyApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryDebitMemoByKey * @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 OK * 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 queryDebitMemoByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryDebitMemoByKey request * @return ExpandedDebitMemo * @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 OK * 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 ExpandedDebitMemo execute() throws ApiException { ApiResponse localVarResp = queryDebitMemoByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryDebitMemoByKey request with HTTP info returned * @return ApiResponse<ExpandedDebitMemo> * @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 OK * 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 queryDebitMemoByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryDebitMemoByKey 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 OK * 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 queryDebitMemoByKeyAsync(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query DebitMemo by key with filters, expands, sort capabilities. Supported expands: account,billtocontact,debitmemoitems,debitmemoitems.subscription,debitmemoitems.subscription.account. * @param key Object ID or Number. (required) * @return QueryDebitMemoByKeyApi */ public QueryDebitMemoByKeyApi queryDebitMemoByKeyApi(String key) { return new QueryDebitMemoByKeyApi(key); } private okhttp3.Call queryDebitMemoItemByKeyCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/debit-memo-items/{key}" .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryDebitMemoItemByKeyValidateBeforeCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { // verify the required parameter 'key' is set if (key == null) { throw new ApiException("Missing the required parameter 'key' when calling queryDebitMemoItemByKey(Async)"); } return queryDebitMemoItemByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query DebitMemoItem by key with filters, expands, sort capabilities. Supported expands: subscription,rateplancharge. * @param key Object ID or Number. (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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return ExpandedDebitMemoItem * @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 OK * 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 ExpandedDebitMemoItem queryDebitMemoItemByKey(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryDebitMemoItemByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryDebitMemoItemByKeyWithHttpInfo(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryDebitMemoItemByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryDebitMemoItemByKeyAsync(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryDebitMemoItemByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryDebitMemoItemByKeyApi { private final String key; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryDebitMemoItemByKeyApi(String key) { this.key = key; } /** * 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 QueryDebitMemoItemByKeyApi */ public QueryDebitMemoItemByKeyApi 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 QueryDebitMemoItemByKeyApi */ public QueryDebitMemoItemByKeyApi 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 QueryDebitMemoItemByKeyApi */ public QueryDebitMemoItemByKeyApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryDebitMemoItemByKeyApi */ public QueryDebitMemoItemByKeyApi 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 QueryDebitMemoItemByKeyApi */ public QueryDebitMemoItemByKeyApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryDebitMemoItemByKeyApi */ public QueryDebitMemoItemByKeyApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryDebitMemoItemByKeyApi */ public QueryDebitMemoItemByKeyApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryDebitMemoItemByKeyApi */ public QueryDebitMemoItemByKeyApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryDebitMemoItemByKeyApi */ public QueryDebitMemoItemByKeyApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryDebitMemoItemByKeyApi */ public QueryDebitMemoItemByKeyApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryDebitMemoItemByKeyApi */ public QueryDebitMemoItemByKeyApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryDebitMemoItemByKeyApi */ public QueryDebitMemoItemByKeyApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryDebitMemoItemByKey * @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 OK * 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 queryDebitMemoItemByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryDebitMemoItemByKey request * @return ExpandedDebitMemoItem * @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 OK * 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 ExpandedDebitMemoItem execute() throws ApiException { ApiResponse localVarResp = queryDebitMemoItemByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryDebitMemoItemByKey request with HTTP info returned * @return ApiResponse<ExpandedDebitMemoItem> * @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 OK * 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 queryDebitMemoItemByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryDebitMemoItemByKey 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 OK * 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 queryDebitMemoItemByKeyAsync(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query DebitMemoItem by key with filters, expands, sort capabilities. Supported expands: subscription,rateplancharge. * @param key Object ID or Number. (required) * @return QueryDebitMemoItemByKeyApi */ public QueryDebitMemoItemByKeyApi queryDebitMemoItemByKeyApi(String key) { return new QueryDebitMemoItemByKeyApi(key); } private okhttp3.Call queryDebitMemoItemsCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/debit-memo-items"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryDebitMemoItemsValidateBeforeCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { return queryDebitMemoItemsCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query DebitMemoItems with filters, expands, sort capabilities. Supported expands: subscription,rateplancharge. * @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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return QueryDebitMemoItemsResponse * @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 OK * 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 QueryDebitMemoItemsResponse queryDebitMemoItems(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryDebitMemoItemsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryDebitMemoItemsWithHttpInfo(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryDebitMemoItemsValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryDebitMemoItemsAsync(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryDebitMemoItemsValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryDebitMemoItemsApi { private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryDebitMemoItemsApi() { } /** * 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 QueryDebitMemoItemsApi */ public QueryDebitMemoItemsApi 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 QueryDebitMemoItemsApi */ public QueryDebitMemoItemsApi 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 QueryDebitMemoItemsApi */ public QueryDebitMemoItemsApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryDebitMemoItemsApi */ public QueryDebitMemoItemsApi 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 QueryDebitMemoItemsApi */ public QueryDebitMemoItemsApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryDebitMemoItemsApi */ public QueryDebitMemoItemsApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryDebitMemoItemsApi */ public QueryDebitMemoItemsApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryDebitMemoItemsApi */ public QueryDebitMemoItemsApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryDebitMemoItemsApi */ public QueryDebitMemoItemsApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryDebitMemoItemsApi */ public QueryDebitMemoItemsApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryDebitMemoItemsApi */ public QueryDebitMemoItemsApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryDebitMemoItemsApi */ public QueryDebitMemoItemsApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryDebitMemoItems * @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 OK * 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 queryDebitMemoItemsCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryDebitMemoItems request * @return QueryDebitMemoItemsResponse * @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 OK * 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 QueryDebitMemoItemsResponse execute() throws ApiException { ApiResponse localVarResp = queryDebitMemoItemsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryDebitMemoItems request with HTTP info returned * @return ApiResponse<QueryDebitMemoItemsResponse> * @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 OK * 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 queryDebitMemoItemsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryDebitMemoItems 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 OK * 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 queryDebitMemoItemsAsync(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query DebitMemoItems with filters, expands, sort capabilities. Supported expands: subscription,rateplancharge. * @return QueryDebitMemoItemsApi */ public QueryDebitMemoItemsApi queryDebitMemoItemsApi() { return new QueryDebitMemoItemsApi(); } private okhttp3.Call queryDebitMemosCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/debit-memos"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryDebitMemosValidateBeforeCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { return queryDebitMemosCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query DebitMemos with filters, expands, sort capabilities. Supported expands: account,billtocontact,debitmemoitems,debitmemoitems.subscription,debitmemoitems.subscription.account. * @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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return QueryDebitMemosResponse * @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 OK * 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 QueryDebitMemosResponse queryDebitMemos(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryDebitMemosWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryDebitMemosWithHttpInfo(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryDebitMemosValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryDebitMemosAsync(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryDebitMemosValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryDebitMemosApi { private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryDebitMemosApi() { } /** * 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 QueryDebitMemosApi */ public QueryDebitMemosApi 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 QueryDebitMemosApi */ public QueryDebitMemosApi 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 QueryDebitMemosApi */ public QueryDebitMemosApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryDebitMemosApi */ public QueryDebitMemosApi 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 QueryDebitMemosApi */ public QueryDebitMemosApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryDebitMemosApi */ public QueryDebitMemosApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryDebitMemosApi */ public QueryDebitMemosApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryDebitMemosApi */ public QueryDebitMemosApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryDebitMemosApi */ public QueryDebitMemosApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryDebitMemosApi */ public QueryDebitMemosApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryDebitMemosApi */ public QueryDebitMemosApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryDebitMemosApi */ public QueryDebitMemosApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryDebitMemos * @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 OK * 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 queryDebitMemosCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryDebitMemos request * @return QueryDebitMemosResponse * @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 OK * 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 QueryDebitMemosResponse execute() throws ApiException { ApiResponse localVarResp = queryDebitMemosWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryDebitMemos request with HTTP info returned * @return ApiResponse<QueryDebitMemosResponse> * @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 OK * 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 queryDebitMemosWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryDebitMemos 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 OK * 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 queryDebitMemosAsync(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query DebitMemos with filters, expands, sort capabilities. Supported expands: account,billtocontact,debitmemoitems,debitmemoitems.subscription,debitmemoitems.subscription.account. * @return QueryDebitMemosApi */ public QueryDebitMemosApi queryDebitMemosApi() { return new QueryDebitMemosApi(); } private okhttp3.Call queryInvoiceByKeyCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/invoices/{key}" .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryInvoiceByKeyValidateBeforeCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { // verify the required parameter 'key' is set if (key == null) { throw new ApiException("Missing the required parameter 'key' when calling queryInvoiceByKey(Async)"); } return queryInvoiceByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query Invoice by key with filters, expands, sort capabilities. Supported expands: account,billtocontact,invoiceitems,invoiceitems.subscription,invoiceitems.subscription.account. * @param key Object ID or Number. (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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return ExpandedInvoice * @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 OK * 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 ExpandedInvoice queryInvoiceByKey(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryInvoiceByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryInvoiceByKeyWithHttpInfo(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryInvoiceByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryInvoiceByKeyAsync(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryInvoiceByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryInvoiceByKeyApi { private final String key; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryInvoiceByKeyApi(String key) { this.key = key; } /** * 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 QueryInvoiceByKeyApi */ public QueryInvoiceByKeyApi 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 QueryInvoiceByKeyApi */ public QueryInvoiceByKeyApi 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 QueryInvoiceByKeyApi */ public QueryInvoiceByKeyApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryInvoiceByKeyApi */ public QueryInvoiceByKeyApi 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 QueryInvoiceByKeyApi */ public QueryInvoiceByKeyApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryInvoiceByKeyApi */ public QueryInvoiceByKeyApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryInvoiceByKeyApi */ public QueryInvoiceByKeyApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryInvoiceByKeyApi */ public QueryInvoiceByKeyApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryInvoiceByKeyApi */ public QueryInvoiceByKeyApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryInvoiceByKeyApi */ public QueryInvoiceByKeyApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryInvoiceByKeyApi */ public QueryInvoiceByKeyApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryInvoiceByKeyApi */ public QueryInvoiceByKeyApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryInvoiceByKey * @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 OK * 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 queryInvoiceByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryInvoiceByKey request * @return ExpandedInvoice * @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 OK * 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 ExpandedInvoice execute() throws ApiException { ApiResponse localVarResp = queryInvoiceByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryInvoiceByKey request with HTTP info returned * @return ApiResponse<ExpandedInvoice> * @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 OK * 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 queryInvoiceByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryInvoiceByKey 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 OK * 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 queryInvoiceByKeyAsync(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query Invoice by key with filters, expands, sort capabilities. Supported expands: account,billtocontact,invoiceitems,invoiceitems.subscription,invoiceitems.subscription.account. * @param key Object ID or Number. (required) * @return QueryInvoiceByKeyApi */ public QueryInvoiceByKeyApi queryInvoiceByKeyApi(String key) { return new QueryInvoiceByKeyApi(key); } private okhttp3.Call queryInvoiceItemByKeyCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/invoice-items/{key}" .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryInvoiceItemByKeyValidateBeforeCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { // verify the required parameter 'key' is set if (key == null) { throw new ApiException("Missing the required parameter 'key' when calling queryInvoiceItemByKey(Async)"); } return queryInvoiceItemByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query InvoiceItem by key with filters, expands, sort capabilities. Supported expands: invoice,subscription,taxationitems,rateplancharge,orderlineitem. * @param key Object ID or Number. (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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return ExpandedInvoiceItem * @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 OK * 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 ExpandedInvoiceItem queryInvoiceItemByKey(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryInvoiceItemByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryInvoiceItemByKeyWithHttpInfo(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryInvoiceItemByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryInvoiceItemByKeyAsync(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryInvoiceItemByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryInvoiceItemByKeyApi { private final String key; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryInvoiceItemByKeyApi(String key) { this.key = key; } /** * 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 QueryInvoiceItemByKeyApi */ public QueryInvoiceItemByKeyApi 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 QueryInvoiceItemByKeyApi */ public QueryInvoiceItemByKeyApi 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 QueryInvoiceItemByKeyApi */ public QueryInvoiceItemByKeyApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryInvoiceItemByKeyApi */ public QueryInvoiceItemByKeyApi 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 QueryInvoiceItemByKeyApi */ public QueryInvoiceItemByKeyApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryInvoiceItemByKeyApi */ public QueryInvoiceItemByKeyApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryInvoiceItemByKeyApi */ public QueryInvoiceItemByKeyApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryInvoiceItemByKeyApi */ public QueryInvoiceItemByKeyApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryInvoiceItemByKeyApi */ public QueryInvoiceItemByKeyApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryInvoiceItemByKeyApi */ public QueryInvoiceItemByKeyApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryInvoiceItemByKeyApi */ public QueryInvoiceItemByKeyApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryInvoiceItemByKeyApi */ public QueryInvoiceItemByKeyApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryInvoiceItemByKey * @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 OK * 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 queryInvoiceItemByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryInvoiceItemByKey request * @return ExpandedInvoiceItem * @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 OK * 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 ExpandedInvoiceItem execute() throws ApiException { ApiResponse localVarResp = queryInvoiceItemByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryInvoiceItemByKey request with HTTP info returned * @return ApiResponse<ExpandedInvoiceItem> * @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 OK * 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 queryInvoiceItemByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryInvoiceItemByKey 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 OK * 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 queryInvoiceItemByKeyAsync(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query InvoiceItem by key with filters, expands, sort capabilities. Supported expands: invoice,subscription,taxationitems,rateplancharge,orderlineitem. * @param key Object ID or Number. (required) * @return QueryInvoiceItemByKeyApi */ public QueryInvoiceItemByKeyApi queryInvoiceItemByKeyApi(String key) { return new QueryInvoiceItemByKeyApi(key); } private okhttp3.Call queryInvoiceItemsCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/invoice-items"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryInvoiceItemsValidateBeforeCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { return queryInvoiceItemsCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query InvoiceItems with filters, expands, sort capabilities. Supported expands: invoice,subscription,taxationitems,rateplancharge,orderlineitem. * @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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return QueryInvoiceItemsResponse * @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 OK * 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 QueryInvoiceItemsResponse queryInvoiceItems(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryInvoiceItemsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryInvoiceItemsWithHttpInfo(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryInvoiceItemsValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryInvoiceItemsAsync(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryInvoiceItemsValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryInvoiceItemsApi { private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryInvoiceItemsApi() { } /** * 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 QueryInvoiceItemsApi */ public QueryInvoiceItemsApi 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 QueryInvoiceItemsApi */ public QueryInvoiceItemsApi 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 QueryInvoiceItemsApi */ public QueryInvoiceItemsApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryInvoiceItemsApi */ public QueryInvoiceItemsApi 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 QueryInvoiceItemsApi */ public QueryInvoiceItemsApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryInvoiceItemsApi */ public QueryInvoiceItemsApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryInvoiceItemsApi */ public QueryInvoiceItemsApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryInvoiceItemsApi */ public QueryInvoiceItemsApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryInvoiceItemsApi */ public QueryInvoiceItemsApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryInvoiceItemsApi */ public QueryInvoiceItemsApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryInvoiceItemsApi */ public QueryInvoiceItemsApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryInvoiceItemsApi */ public QueryInvoiceItemsApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryInvoiceItems * @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 OK * 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 queryInvoiceItemsCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryInvoiceItems request * @return QueryInvoiceItemsResponse * @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 OK * 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 QueryInvoiceItemsResponse execute() throws ApiException { ApiResponse localVarResp = queryInvoiceItemsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryInvoiceItems request with HTTP info returned * @return ApiResponse<QueryInvoiceItemsResponse> * @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 OK * 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 queryInvoiceItemsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryInvoiceItems 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 OK * 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 queryInvoiceItemsAsync(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query InvoiceItems with filters, expands, sort capabilities. Supported expands: invoice,subscription,taxationitems,rateplancharge,orderlineitem. * @return QueryInvoiceItemsApi */ public QueryInvoiceItemsApi queryInvoiceItemsApi() { return new QueryInvoiceItemsApi(); } private okhttp3.Call queryInvoicesCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/invoices"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryInvoicesValidateBeforeCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { return queryInvoicesCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query Invoices with filters, expands, sort capabilities. Supported expands: account,billtocontact,invoiceitems,invoiceitems.subscription,invoiceitems.subscription.account. * @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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return QueryInvoicesResponse * @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 OK * 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 QueryInvoicesResponse queryInvoices(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryInvoicesWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryInvoicesWithHttpInfo(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryInvoicesValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryInvoicesAsync(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryInvoicesValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryInvoicesApi { private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryInvoicesApi() { } /** * 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 QueryInvoicesApi */ public QueryInvoicesApi 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 QueryInvoicesApi */ public QueryInvoicesApi 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 QueryInvoicesApi */ public QueryInvoicesApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryInvoicesApi */ public QueryInvoicesApi 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 QueryInvoicesApi */ public QueryInvoicesApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryInvoicesApi */ public QueryInvoicesApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryInvoicesApi */ public QueryInvoicesApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryInvoicesApi */ public QueryInvoicesApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryInvoicesApi */ public QueryInvoicesApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryInvoicesApi */ public QueryInvoicesApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryInvoicesApi */ public QueryInvoicesApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryInvoicesApi */ public QueryInvoicesApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryInvoices * @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 OK * 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 queryInvoicesCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryInvoices request * @return QueryInvoicesResponse * @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 OK * 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 QueryInvoicesResponse execute() throws ApiException { ApiResponse localVarResp = queryInvoicesWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryInvoices request with HTTP info returned * @return ApiResponse<QueryInvoicesResponse> * @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 OK * 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 queryInvoicesWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryInvoices 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 OK * 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 queryInvoicesAsync(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query Invoices with filters, expands, sort capabilities. Supported expands: account,billtocontact,invoiceitems,invoiceitems.subscription,invoiceitems.subscription.account. * @return QueryInvoicesApi */ public QueryInvoicesApi queryInvoicesApi() { return new QueryInvoicesApi(); } private okhttp3.Call queryOrderActionByKeyCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/order-actions/{key}" .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryOrderActionByKeyValidateBeforeCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { // verify the required parameter 'key' is set if (key == null) { throw new ApiException("Missing the required parameter 'key' when calling queryOrderActionByKey(Async)"); } return queryOrderActionByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query OrderAction by key with filters, expands, sort capabilities. Supported expands: subscription,order. * @param key Object ID or Number. (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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return ExpandedOrderAction * @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 OK * 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 ExpandedOrderAction queryOrderActionByKey(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryOrderActionByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryOrderActionByKeyWithHttpInfo(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryOrderActionByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryOrderActionByKeyAsync(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryOrderActionByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryOrderActionByKeyApi { private final String key; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryOrderActionByKeyApi(String key) { this.key = key; } /** * 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 QueryOrderActionByKeyApi */ public QueryOrderActionByKeyApi 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 QueryOrderActionByKeyApi */ public QueryOrderActionByKeyApi 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 QueryOrderActionByKeyApi */ public QueryOrderActionByKeyApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryOrderActionByKeyApi */ public QueryOrderActionByKeyApi 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 QueryOrderActionByKeyApi */ public QueryOrderActionByKeyApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryOrderActionByKeyApi */ public QueryOrderActionByKeyApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryOrderActionByKeyApi */ public QueryOrderActionByKeyApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryOrderActionByKeyApi */ public QueryOrderActionByKeyApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryOrderActionByKeyApi */ public QueryOrderActionByKeyApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryOrderActionByKeyApi */ public QueryOrderActionByKeyApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryOrderActionByKeyApi */ public QueryOrderActionByKeyApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryOrderActionByKeyApi */ public QueryOrderActionByKeyApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryOrderActionByKey * @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 OK * 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 queryOrderActionByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryOrderActionByKey request * @return ExpandedOrderAction * @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 OK * 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 ExpandedOrderAction execute() throws ApiException { ApiResponse localVarResp = queryOrderActionByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryOrderActionByKey request with HTTP info returned * @return ApiResponse<ExpandedOrderAction> * @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 OK * 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 queryOrderActionByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryOrderActionByKey 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 OK * 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 queryOrderActionByKeyAsync(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query OrderAction by key with filters, expands, sort capabilities. Supported expands: subscription,order. * @param key Object ID or Number. (required) * @return QueryOrderActionByKeyApi */ public QueryOrderActionByKeyApi queryOrderActionByKeyApi(String key) { return new QueryOrderActionByKeyApi(key); } private okhttp3.Call queryOrderActionsCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/order-actions"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryOrderActionsValidateBeforeCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { return queryOrderActionsCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query OrderActions with filters, expands, sort capabilities. Supported expands: subscription,order. * @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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return QueryOrderActionsResponse * @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 OK * 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 QueryOrderActionsResponse queryOrderActions(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryOrderActionsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryOrderActionsWithHttpInfo(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryOrderActionsValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryOrderActionsAsync(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryOrderActionsValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryOrderActionsApi { private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryOrderActionsApi() { } /** * 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 QueryOrderActionsApi */ public QueryOrderActionsApi 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 QueryOrderActionsApi */ public QueryOrderActionsApi 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 QueryOrderActionsApi */ public QueryOrderActionsApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryOrderActionsApi */ public QueryOrderActionsApi 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 QueryOrderActionsApi */ public QueryOrderActionsApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryOrderActionsApi */ public QueryOrderActionsApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryOrderActionsApi */ public QueryOrderActionsApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryOrderActionsApi */ public QueryOrderActionsApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryOrderActionsApi */ public QueryOrderActionsApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryOrderActionsApi */ public QueryOrderActionsApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryOrderActionsApi */ public QueryOrderActionsApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryOrderActionsApi */ public QueryOrderActionsApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryOrderActions * @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 OK * 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 queryOrderActionsCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryOrderActions request * @return QueryOrderActionsResponse * @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 OK * 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 QueryOrderActionsResponse execute() throws ApiException { ApiResponse localVarResp = queryOrderActionsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryOrderActions request with HTTP info returned * @return ApiResponse<QueryOrderActionsResponse> * @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 OK * 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 queryOrderActionsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryOrderActions 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 OK * 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 queryOrderActionsAsync(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query OrderActions with filters, expands, sort capabilities. Supported expands: subscription,order. * @return QueryOrderActionsApi */ public QueryOrderActionsApi queryOrderActionsApi() { return new QueryOrderActionsApi(); } private okhttp3.Call queryOrderLineItemByKeyCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/order-line-items/{key}" .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryOrderLineItemByKeyValidateBeforeCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { // verify the required parameter 'key' is set if (key == null) { throw new ApiException("Missing the required parameter 'key' when calling queryOrderLineItemByKey(Async)"); } return queryOrderLineItemByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query OrderLineItem by key with filters, expands, sort capabilities. Supported expands: invoiceitems. * @param key Object ID or Number. (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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return ExpandedOrderLineItem * @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 OK * 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 ExpandedOrderLineItem queryOrderLineItemByKey(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryOrderLineItemByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryOrderLineItemByKeyWithHttpInfo(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryOrderLineItemByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryOrderLineItemByKeyAsync(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryOrderLineItemByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryOrderLineItemByKeyApi { private final String key; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryOrderLineItemByKeyApi(String key) { this.key = key; } /** * 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 QueryOrderLineItemByKeyApi */ public QueryOrderLineItemByKeyApi 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 QueryOrderLineItemByKeyApi */ public QueryOrderLineItemByKeyApi 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 QueryOrderLineItemByKeyApi */ public QueryOrderLineItemByKeyApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryOrderLineItemByKeyApi */ public QueryOrderLineItemByKeyApi 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 QueryOrderLineItemByKeyApi */ public QueryOrderLineItemByKeyApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryOrderLineItemByKeyApi */ public QueryOrderLineItemByKeyApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryOrderLineItemByKeyApi */ public QueryOrderLineItemByKeyApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryOrderLineItemByKeyApi */ public QueryOrderLineItemByKeyApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryOrderLineItemByKeyApi */ public QueryOrderLineItemByKeyApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryOrderLineItemByKeyApi */ public QueryOrderLineItemByKeyApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryOrderLineItemByKeyApi */ public QueryOrderLineItemByKeyApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryOrderLineItemByKeyApi */ public QueryOrderLineItemByKeyApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryOrderLineItemByKey * @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 OK * 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 queryOrderLineItemByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryOrderLineItemByKey request * @return ExpandedOrderLineItem * @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 OK * 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 ExpandedOrderLineItem execute() throws ApiException { ApiResponse localVarResp = queryOrderLineItemByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryOrderLineItemByKey request with HTTP info returned * @return ApiResponse<ExpandedOrderLineItem> * @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 OK * 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 queryOrderLineItemByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryOrderLineItemByKey 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 OK * 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 queryOrderLineItemByKeyAsync(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query OrderLineItem by key with filters, expands, sort capabilities. Supported expands: invoiceitems. * @param key Object ID or Number. (required) * @return QueryOrderLineItemByKeyApi */ public QueryOrderLineItemByKeyApi queryOrderLineItemByKeyApi(String key) { return new QueryOrderLineItemByKeyApi(key); } private okhttp3.Call queryOrderLineItemsCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/order-line-items"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryOrderLineItemsValidateBeforeCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { return queryOrderLineItemsCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query OrderLineItems with filters, expands, sort capabilities. Supported expands: invoiceitems. * @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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return QueryOrderLineItemsResponse * @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 OK * 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 QueryOrderLineItemsResponse queryOrderLineItems(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryOrderLineItemsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryOrderLineItemsWithHttpInfo(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryOrderLineItemsValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryOrderLineItemsAsync(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryOrderLineItemsValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryOrderLineItemsApi { private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryOrderLineItemsApi() { } /** * 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 QueryOrderLineItemsApi */ public QueryOrderLineItemsApi 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 QueryOrderLineItemsApi */ public QueryOrderLineItemsApi 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 QueryOrderLineItemsApi */ public QueryOrderLineItemsApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryOrderLineItemsApi */ public QueryOrderLineItemsApi 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 QueryOrderLineItemsApi */ public QueryOrderLineItemsApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryOrderLineItemsApi */ public QueryOrderLineItemsApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryOrderLineItemsApi */ public QueryOrderLineItemsApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryOrderLineItemsApi */ public QueryOrderLineItemsApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryOrderLineItemsApi */ public QueryOrderLineItemsApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryOrderLineItemsApi */ public QueryOrderLineItemsApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryOrderLineItemsApi */ public QueryOrderLineItemsApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryOrderLineItemsApi */ public QueryOrderLineItemsApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryOrderLineItems * @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 OK * 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 queryOrderLineItemsCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryOrderLineItems request * @return QueryOrderLineItemsResponse * @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 OK * 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 QueryOrderLineItemsResponse execute() throws ApiException { ApiResponse localVarResp = queryOrderLineItemsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryOrderLineItems request with HTTP info returned * @return ApiResponse<QueryOrderLineItemsResponse> * @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 OK * 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 queryOrderLineItemsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryOrderLineItems 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 OK * 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 queryOrderLineItemsAsync(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query OrderLineItems with filters, expands, sort capabilities. Supported expands: invoiceitems. * @return QueryOrderLineItemsApi */ public QueryOrderLineItemsApi queryOrderLineItemsApi() { return new QueryOrderLineItemsApi(); } private okhttp3.Call queryOrdersByKeyCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/orders/{key}" .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryOrdersByKeyValidateBeforeCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { // verify the required parameter 'key' is set if (key == null) { throw new ApiException("Missing the required parameter 'key' when calling queryOrdersByKey(Async)"); } return queryOrdersByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query Orders by key with filters, expands, sort capabilities. Supported expands: account,orderlineitems,orderlineitems.invoiceitems,orderactions,orderactions.subscription,orderactions.subscription.rateplans,orderactions.subscription.rateplans.rateplancharges. * @param key Object ID or Number. (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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return ExpandedOrders * @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 OK * 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 ExpandedOrders queryOrdersByKey(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryOrdersByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryOrdersByKeyWithHttpInfo(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryOrdersByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryOrdersByKeyAsync(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryOrdersByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryOrdersByKeyApi { private final String key; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryOrdersByKeyApi(String key) { this.key = key; } /** * 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 QueryOrdersByKeyApi */ public QueryOrdersByKeyApi 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 QueryOrdersByKeyApi */ public QueryOrdersByKeyApi 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 QueryOrdersByKeyApi */ public QueryOrdersByKeyApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryOrdersByKeyApi */ public QueryOrdersByKeyApi 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 QueryOrdersByKeyApi */ public QueryOrdersByKeyApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryOrdersByKeyApi */ public QueryOrdersByKeyApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryOrdersByKeyApi */ public QueryOrdersByKeyApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryOrdersByKeyApi */ public QueryOrdersByKeyApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryOrdersByKeyApi */ public QueryOrdersByKeyApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryOrdersByKeyApi */ public QueryOrdersByKeyApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryOrdersByKeyApi */ public QueryOrdersByKeyApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryOrdersByKeyApi */ public QueryOrdersByKeyApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryOrdersByKey * @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 OK * 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 queryOrdersByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryOrdersByKey request * @return ExpandedOrders * @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 OK * 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 ExpandedOrders execute() throws ApiException { ApiResponse localVarResp = queryOrdersByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryOrdersByKey request with HTTP info returned * @return ApiResponse<ExpandedOrders> * @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 OK * 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 queryOrdersByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryOrdersByKey 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 OK * 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 queryOrdersByKeyAsync(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query Orders by key with filters, expands, sort capabilities. Supported expands: account,orderlineitems,orderlineitems.invoiceitems,orderactions,orderactions.subscription,orderactions.subscription.rateplans,orderactions.subscription.rateplans.rateplancharges. * @param key Object ID or Number. (required) * @return QueryOrdersByKeyApi */ public QueryOrdersByKeyApi queryOrdersByKeyApi(String key) { return new QueryOrdersByKeyApi(key); } private okhttp3.Call queryOrderssCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/orders"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryOrderssValidateBeforeCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { return queryOrderssCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query Orderss with filters, expands, sort capabilities. Supported expands: account,orderlineitems,orderlineitems.invoiceitems,orderactions,orderactions.subscription,orderactions.subscription.rateplans,orderactions.subscription.rateplans.rateplancharges. * @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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return QueryOrderssResponse * @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 OK * 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 QueryOrderssResponse queryOrderss(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryOrderssWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryOrderssWithHttpInfo(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryOrderssValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryOrderssAsync(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryOrderssValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryOrderssApi { private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryOrderssApi() { } /** * 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 QueryOrderssApi */ public QueryOrderssApi 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 QueryOrderssApi */ public QueryOrderssApi 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 QueryOrderssApi */ public QueryOrderssApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryOrderssApi */ public QueryOrderssApi 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 QueryOrderssApi */ public QueryOrderssApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryOrderssApi */ public QueryOrderssApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryOrderssApi */ public QueryOrderssApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryOrderssApi */ public QueryOrderssApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryOrderssApi */ public QueryOrderssApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryOrderssApi */ public QueryOrderssApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryOrderssApi */ public QueryOrderssApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryOrderssApi */ public QueryOrderssApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryOrderss * @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 OK * 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 queryOrderssCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryOrderss request * @return QueryOrderssResponse * @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 OK * 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 QueryOrderssResponse execute() throws ApiException { ApiResponse localVarResp = queryOrderssWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryOrderss request with HTTP info returned * @return ApiResponse<QueryOrderssResponse> * @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 OK * 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 queryOrderssWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryOrderss 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 OK * 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 queryOrderssAsync(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query Orderss with filters, expands, sort capabilities. Supported expands: account,orderlineitems,orderlineitems.invoiceitems,orderactions,orderactions.subscription,orderactions.subscription.rateplans,orderactions.subscription.rateplans.rateplancharges. * @return QueryOrderssApi */ public QueryOrderssApi queryOrderssApi() { return new QueryOrderssApi(); } private okhttp3.Call queryPaymentApplicationByKeyCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/payment-applications/{key}" .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryPaymentApplicationByKeyValidateBeforeCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { // verify the required parameter 'key' is set if (key == null) { throw new ApiException("Missing the required parameter 'key' when calling queryPaymentApplicationByKey(Async)"); } return queryPaymentApplicationByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query PaymentApplication by key with filters, expands, sort capabilities. Supported expands: payment. * @param key Object ID or Number. (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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return ExpandedPaymentApplication * @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 OK * 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 ExpandedPaymentApplication queryPaymentApplicationByKey(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryPaymentApplicationByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryPaymentApplicationByKeyWithHttpInfo(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryPaymentApplicationByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryPaymentApplicationByKeyAsync(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryPaymentApplicationByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryPaymentApplicationByKeyApi { private final String key; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryPaymentApplicationByKeyApi(String key) { this.key = key; } /** * 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 QueryPaymentApplicationByKeyApi */ public QueryPaymentApplicationByKeyApi 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 QueryPaymentApplicationByKeyApi */ public QueryPaymentApplicationByKeyApi 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 QueryPaymentApplicationByKeyApi */ public QueryPaymentApplicationByKeyApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryPaymentApplicationByKeyApi */ public QueryPaymentApplicationByKeyApi 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 QueryPaymentApplicationByKeyApi */ public QueryPaymentApplicationByKeyApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryPaymentApplicationByKeyApi */ public QueryPaymentApplicationByKeyApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryPaymentApplicationByKeyApi */ public QueryPaymentApplicationByKeyApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryPaymentApplicationByKeyApi */ public QueryPaymentApplicationByKeyApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryPaymentApplicationByKeyApi */ public QueryPaymentApplicationByKeyApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryPaymentApplicationByKeyApi */ public QueryPaymentApplicationByKeyApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryPaymentApplicationByKeyApi */ public QueryPaymentApplicationByKeyApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryPaymentApplicationByKeyApi */ public QueryPaymentApplicationByKeyApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryPaymentApplicationByKey * @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 OK * 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 queryPaymentApplicationByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryPaymentApplicationByKey request * @return ExpandedPaymentApplication * @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 OK * 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 ExpandedPaymentApplication execute() throws ApiException { ApiResponse localVarResp = queryPaymentApplicationByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryPaymentApplicationByKey request with HTTP info returned * @return ApiResponse<ExpandedPaymentApplication> * @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 OK * 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 queryPaymentApplicationByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryPaymentApplicationByKey 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 OK * 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 queryPaymentApplicationByKeyAsync(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query PaymentApplication by key with filters, expands, sort capabilities. Supported expands: payment. * @param key Object ID or Number. (required) * @return QueryPaymentApplicationByKeyApi */ public QueryPaymentApplicationByKeyApi queryPaymentApplicationByKeyApi(String key) { return new QueryPaymentApplicationByKeyApi(key); } private okhttp3.Call queryPaymentApplicationsCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/payment-applications"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryPaymentApplicationsValidateBeforeCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { return queryPaymentApplicationsCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query PaymentApplications with filters, expands, sort capabilities. Supported expands: payment. * @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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return QueryPaymentApplicationsResponse * @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 OK * 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 QueryPaymentApplicationsResponse queryPaymentApplications(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryPaymentApplicationsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryPaymentApplicationsWithHttpInfo(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryPaymentApplicationsValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryPaymentApplicationsAsync(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryPaymentApplicationsValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryPaymentApplicationsApi { private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryPaymentApplicationsApi() { } /** * 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 QueryPaymentApplicationsApi */ public QueryPaymentApplicationsApi 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 QueryPaymentApplicationsApi */ public QueryPaymentApplicationsApi 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 QueryPaymentApplicationsApi */ public QueryPaymentApplicationsApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryPaymentApplicationsApi */ public QueryPaymentApplicationsApi 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 QueryPaymentApplicationsApi */ public QueryPaymentApplicationsApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryPaymentApplicationsApi */ public QueryPaymentApplicationsApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryPaymentApplicationsApi */ public QueryPaymentApplicationsApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryPaymentApplicationsApi */ public QueryPaymentApplicationsApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryPaymentApplicationsApi */ public QueryPaymentApplicationsApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryPaymentApplicationsApi */ public QueryPaymentApplicationsApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryPaymentApplicationsApi */ public QueryPaymentApplicationsApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryPaymentApplicationsApi */ public QueryPaymentApplicationsApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryPaymentApplications * @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 OK * 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 queryPaymentApplicationsCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryPaymentApplications request * @return QueryPaymentApplicationsResponse * @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 OK * 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 QueryPaymentApplicationsResponse execute() throws ApiException { ApiResponse localVarResp = queryPaymentApplicationsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryPaymentApplications request with HTTP info returned * @return ApiResponse<QueryPaymentApplicationsResponse> * @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 OK * 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 queryPaymentApplicationsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryPaymentApplications 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 OK * 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 queryPaymentApplicationsAsync(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query PaymentApplications with filters, expands, sort capabilities. Supported expands: payment. * @return QueryPaymentApplicationsApi */ public QueryPaymentApplicationsApi queryPaymentApplicationsApi() { return new QueryPaymentApplicationsApi(); } private okhttp3.Call queryPaymentByKeyCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/payments/{key}" .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryPaymentByKeyValidateBeforeCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { // verify the required parameter 'key' is set if (key == null) { throw new ApiException("Missing the required parameter 'key' when calling queryPaymentByKey(Async)"); } return queryPaymentByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query Payment by key with filters, expands, sort capabilities. Supported expands: account,account.billto,account.soldto,paymentmethod,paymentapplications. * @param key Object ID or Number. (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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return ExpandedPayment * @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 OK * 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 ExpandedPayment queryPaymentByKey(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryPaymentByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryPaymentByKeyWithHttpInfo(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryPaymentByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryPaymentByKeyAsync(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryPaymentByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryPaymentByKeyApi { private final String key; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryPaymentByKeyApi(String key) { this.key = key; } /** * 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 QueryPaymentByKeyApi */ public QueryPaymentByKeyApi 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 QueryPaymentByKeyApi */ public QueryPaymentByKeyApi 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 QueryPaymentByKeyApi */ public QueryPaymentByKeyApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryPaymentByKeyApi */ public QueryPaymentByKeyApi 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 QueryPaymentByKeyApi */ public QueryPaymentByKeyApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryPaymentByKeyApi */ public QueryPaymentByKeyApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryPaymentByKeyApi */ public QueryPaymentByKeyApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryPaymentByKeyApi */ public QueryPaymentByKeyApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryPaymentByKeyApi */ public QueryPaymentByKeyApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryPaymentByKeyApi */ public QueryPaymentByKeyApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryPaymentByKeyApi */ public QueryPaymentByKeyApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryPaymentByKeyApi */ public QueryPaymentByKeyApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryPaymentByKey * @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 OK * 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 queryPaymentByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryPaymentByKey request * @return ExpandedPayment * @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 OK * 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 ExpandedPayment execute() throws ApiException { ApiResponse localVarResp = queryPaymentByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryPaymentByKey request with HTTP info returned * @return ApiResponse<ExpandedPayment> * @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 OK * 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 queryPaymentByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryPaymentByKey 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 OK * 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 queryPaymentByKeyAsync(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query Payment by key with filters, expands, sort capabilities. Supported expands: account,account.billto,account.soldto,paymentmethod,paymentapplications. * @param key Object ID or Number. (required) * @return QueryPaymentByKeyApi */ public QueryPaymentByKeyApi queryPaymentByKeyApi(String key) { return new QueryPaymentByKeyApi(key); } private okhttp3.Call queryPaymentMethodByKeyCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/payment-methods/{key}" .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryPaymentMethodByKeyValidateBeforeCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { // verify the required parameter 'key' is set if (key == null) { throw new ApiException("Missing the required parameter 'key' when calling queryPaymentMethodByKey(Async)"); } return queryPaymentMethodByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query PaymentMethod by key with filters, expands, sort capabilities. Supported expands: account. * @param key Object ID or Number. (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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return ExpandedPaymentMethod * @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 OK * 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 ExpandedPaymentMethod queryPaymentMethodByKey(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryPaymentMethodByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryPaymentMethodByKeyWithHttpInfo(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryPaymentMethodByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryPaymentMethodByKeyAsync(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryPaymentMethodByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryPaymentMethodByKeyApi { private final String key; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryPaymentMethodByKeyApi(String key) { this.key = key; } /** * 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 QueryPaymentMethodByKeyApi */ public QueryPaymentMethodByKeyApi 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 QueryPaymentMethodByKeyApi */ public QueryPaymentMethodByKeyApi 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 QueryPaymentMethodByKeyApi */ public QueryPaymentMethodByKeyApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryPaymentMethodByKeyApi */ public QueryPaymentMethodByKeyApi 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 QueryPaymentMethodByKeyApi */ public QueryPaymentMethodByKeyApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryPaymentMethodByKeyApi */ public QueryPaymentMethodByKeyApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryPaymentMethodByKeyApi */ public QueryPaymentMethodByKeyApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryPaymentMethodByKeyApi */ public QueryPaymentMethodByKeyApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryPaymentMethodByKeyApi */ public QueryPaymentMethodByKeyApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryPaymentMethodByKeyApi */ public QueryPaymentMethodByKeyApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryPaymentMethodByKeyApi */ public QueryPaymentMethodByKeyApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryPaymentMethodByKeyApi */ public QueryPaymentMethodByKeyApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryPaymentMethodByKey * @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 OK * 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 queryPaymentMethodByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryPaymentMethodByKey request * @return ExpandedPaymentMethod * @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 OK * 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 ExpandedPaymentMethod execute() throws ApiException { ApiResponse localVarResp = queryPaymentMethodByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryPaymentMethodByKey request with HTTP info returned * @return ApiResponse<ExpandedPaymentMethod> * @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 OK * 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 queryPaymentMethodByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryPaymentMethodByKey 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 OK * 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 queryPaymentMethodByKeyAsync(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query PaymentMethod by key with filters, expands, sort capabilities. Supported expands: account. * @param key Object ID or Number. (required) * @return QueryPaymentMethodByKeyApi */ public QueryPaymentMethodByKeyApi queryPaymentMethodByKeyApi(String key) { return new QueryPaymentMethodByKeyApi(key); } private okhttp3.Call queryPaymentMethodSnapshotByKeyCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/payment-method-snapshots/{key}" .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryPaymentMethodSnapshotByKeyValidateBeforeCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { // verify the required parameter 'key' is set if (key == null) { throw new ApiException("Missing the required parameter 'key' when calling queryPaymentMethodSnapshotByKey(Async)"); } return queryPaymentMethodSnapshotByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query PaymentMethodSnapshot by key with filters, expands, sort capabilities. Supported expands: N/A. * @param key Object ID or Number. (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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return ExpandedPaymentMethodSnapshot * @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 OK * 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 ExpandedPaymentMethodSnapshot queryPaymentMethodSnapshotByKey(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryPaymentMethodSnapshotByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryPaymentMethodSnapshotByKeyWithHttpInfo(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryPaymentMethodSnapshotByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryPaymentMethodSnapshotByKeyAsync(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryPaymentMethodSnapshotByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryPaymentMethodSnapshotByKeyApi { private final String key; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryPaymentMethodSnapshotByKeyApi(String key) { this.key = key; } /** * 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 QueryPaymentMethodSnapshotByKeyApi */ public QueryPaymentMethodSnapshotByKeyApi 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 QueryPaymentMethodSnapshotByKeyApi */ public QueryPaymentMethodSnapshotByKeyApi 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 QueryPaymentMethodSnapshotByKeyApi */ public QueryPaymentMethodSnapshotByKeyApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryPaymentMethodSnapshotByKeyApi */ public QueryPaymentMethodSnapshotByKeyApi 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 QueryPaymentMethodSnapshotByKeyApi */ public QueryPaymentMethodSnapshotByKeyApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryPaymentMethodSnapshotByKeyApi */ public QueryPaymentMethodSnapshotByKeyApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryPaymentMethodSnapshotByKeyApi */ public QueryPaymentMethodSnapshotByKeyApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryPaymentMethodSnapshotByKeyApi */ public QueryPaymentMethodSnapshotByKeyApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryPaymentMethodSnapshotByKeyApi */ public QueryPaymentMethodSnapshotByKeyApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryPaymentMethodSnapshotByKeyApi */ public QueryPaymentMethodSnapshotByKeyApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryPaymentMethodSnapshotByKeyApi */ public QueryPaymentMethodSnapshotByKeyApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryPaymentMethodSnapshotByKeyApi */ public QueryPaymentMethodSnapshotByKeyApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryPaymentMethodSnapshotByKey * @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 OK * 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 queryPaymentMethodSnapshotByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryPaymentMethodSnapshotByKey request * @return ExpandedPaymentMethodSnapshot * @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 OK * 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 ExpandedPaymentMethodSnapshot execute() throws ApiException { ApiResponse localVarResp = queryPaymentMethodSnapshotByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryPaymentMethodSnapshotByKey request with HTTP info returned * @return ApiResponse<ExpandedPaymentMethodSnapshot> * @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 OK * 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 queryPaymentMethodSnapshotByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryPaymentMethodSnapshotByKey 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 OK * 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 queryPaymentMethodSnapshotByKeyAsync(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query PaymentMethodSnapshot by key with filters, expands, sort capabilities. Supported expands: N/A. * @param key Object ID or Number. (required) * @return QueryPaymentMethodSnapshotByKeyApi */ public QueryPaymentMethodSnapshotByKeyApi queryPaymentMethodSnapshotByKeyApi(String key) { return new QueryPaymentMethodSnapshotByKeyApi(key); } private okhttp3.Call queryPaymentMethodSnapshotsCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/payment-method-snapshots"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryPaymentMethodSnapshotsValidateBeforeCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { return queryPaymentMethodSnapshotsCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query PaymentMethodSnapshots with filters, expands, sort capabilities. Supported expands: N/A. * @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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return QueryPaymentMethodSnapshotsResponse * @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 OK * 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 QueryPaymentMethodSnapshotsResponse queryPaymentMethodSnapshots(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryPaymentMethodSnapshotsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryPaymentMethodSnapshotsWithHttpInfo(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryPaymentMethodSnapshotsValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryPaymentMethodSnapshotsAsync(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryPaymentMethodSnapshotsValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryPaymentMethodSnapshotsApi { private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryPaymentMethodSnapshotsApi() { } /** * 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 QueryPaymentMethodSnapshotsApi */ public QueryPaymentMethodSnapshotsApi 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 QueryPaymentMethodSnapshotsApi */ public QueryPaymentMethodSnapshotsApi 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 QueryPaymentMethodSnapshotsApi */ public QueryPaymentMethodSnapshotsApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryPaymentMethodSnapshotsApi */ public QueryPaymentMethodSnapshotsApi 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 QueryPaymentMethodSnapshotsApi */ public QueryPaymentMethodSnapshotsApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryPaymentMethodSnapshotsApi */ public QueryPaymentMethodSnapshotsApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryPaymentMethodSnapshotsApi */ public QueryPaymentMethodSnapshotsApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryPaymentMethodSnapshotsApi */ public QueryPaymentMethodSnapshotsApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryPaymentMethodSnapshotsApi */ public QueryPaymentMethodSnapshotsApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryPaymentMethodSnapshotsApi */ public QueryPaymentMethodSnapshotsApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryPaymentMethodSnapshotsApi */ public QueryPaymentMethodSnapshotsApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryPaymentMethodSnapshotsApi */ public QueryPaymentMethodSnapshotsApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryPaymentMethodSnapshots * @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 OK * 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 queryPaymentMethodSnapshotsCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryPaymentMethodSnapshots request * @return QueryPaymentMethodSnapshotsResponse * @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 OK * 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 QueryPaymentMethodSnapshotsResponse execute() throws ApiException { ApiResponse localVarResp = queryPaymentMethodSnapshotsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryPaymentMethodSnapshots request with HTTP info returned * @return ApiResponse<QueryPaymentMethodSnapshotsResponse> * @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 OK * 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 queryPaymentMethodSnapshotsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryPaymentMethodSnapshots 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 OK * 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 queryPaymentMethodSnapshotsAsync(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query PaymentMethodSnapshots with filters, expands, sort capabilities. Supported expands: N/A. * @return QueryPaymentMethodSnapshotsApi */ public QueryPaymentMethodSnapshotsApi queryPaymentMethodSnapshotsApi() { return new QueryPaymentMethodSnapshotsApi(); } private okhttp3.Call queryPaymentMethodsCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/payment-methods"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryPaymentMethodsValidateBeforeCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { return queryPaymentMethodsCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query PaymentMethods with filters, expands, sort capabilities. Supported expands: account. * @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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return QueryPaymentMethodsResponse * @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 OK * 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 QueryPaymentMethodsResponse queryPaymentMethods(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryPaymentMethodsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryPaymentMethodsWithHttpInfo(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryPaymentMethodsValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryPaymentMethodsAsync(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryPaymentMethodsValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryPaymentMethodsApi { private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryPaymentMethodsApi() { } /** * 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 QueryPaymentMethodsApi */ public QueryPaymentMethodsApi 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 QueryPaymentMethodsApi */ public QueryPaymentMethodsApi 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 QueryPaymentMethodsApi */ public QueryPaymentMethodsApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryPaymentMethodsApi */ public QueryPaymentMethodsApi 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 QueryPaymentMethodsApi */ public QueryPaymentMethodsApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryPaymentMethodsApi */ public QueryPaymentMethodsApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryPaymentMethodsApi */ public QueryPaymentMethodsApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryPaymentMethodsApi */ public QueryPaymentMethodsApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryPaymentMethodsApi */ public QueryPaymentMethodsApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryPaymentMethodsApi */ public QueryPaymentMethodsApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryPaymentMethodsApi */ public QueryPaymentMethodsApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryPaymentMethodsApi */ public QueryPaymentMethodsApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryPaymentMethods * @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 OK * 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 queryPaymentMethodsCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryPaymentMethods request * @return QueryPaymentMethodsResponse * @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 OK * 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 QueryPaymentMethodsResponse execute() throws ApiException { ApiResponse localVarResp = queryPaymentMethodsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryPaymentMethods request with HTTP info returned * @return ApiResponse<QueryPaymentMethodsResponse> * @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 OK * 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 queryPaymentMethodsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryPaymentMethods 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 OK * 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 queryPaymentMethodsAsync(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query PaymentMethods with filters, expands, sort capabilities. Supported expands: account. * @return QueryPaymentMethodsApi */ public QueryPaymentMethodsApi queryPaymentMethodsApi() { return new QueryPaymentMethodsApi(); } private okhttp3.Call queryPaymentRunByKeyCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/payment-runs/{key}" .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryPaymentRunByKeyValidateBeforeCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { // verify the required parameter 'key' is set if (key == null) { throw new ApiException("Missing the required parameter 'key' when calling queryPaymentRunByKey(Async)"); } return queryPaymentRunByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query PaymentRun by key with filters, expands, sort capabilities. Supported expands: N/A. * @param key Object ID or Number. (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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return ExpandedPaymentRun * @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 OK * 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 ExpandedPaymentRun queryPaymentRunByKey(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryPaymentRunByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryPaymentRunByKeyWithHttpInfo(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryPaymentRunByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryPaymentRunByKeyAsync(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryPaymentRunByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryPaymentRunByKeyApi { private final String key; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryPaymentRunByKeyApi(String key) { this.key = key; } /** * 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 QueryPaymentRunByKeyApi */ public QueryPaymentRunByKeyApi 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 QueryPaymentRunByKeyApi */ public QueryPaymentRunByKeyApi 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 QueryPaymentRunByKeyApi */ public QueryPaymentRunByKeyApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryPaymentRunByKeyApi */ public QueryPaymentRunByKeyApi 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 QueryPaymentRunByKeyApi */ public QueryPaymentRunByKeyApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryPaymentRunByKeyApi */ public QueryPaymentRunByKeyApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryPaymentRunByKeyApi */ public QueryPaymentRunByKeyApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryPaymentRunByKeyApi */ public QueryPaymentRunByKeyApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryPaymentRunByKeyApi */ public QueryPaymentRunByKeyApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryPaymentRunByKeyApi */ public QueryPaymentRunByKeyApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryPaymentRunByKeyApi */ public QueryPaymentRunByKeyApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryPaymentRunByKeyApi */ public QueryPaymentRunByKeyApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryPaymentRunByKey * @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 OK * 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 queryPaymentRunByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryPaymentRunByKey request * @return ExpandedPaymentRun * @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 OK * 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 ExpandedPaymentRun execute() throws ApiException { ApiResponse localVarResp = queryPaymentRunByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryPaymentRunByKey request with HTTP info returned * @return ApiResponse<ExpandedPaymentRun> * @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 OK * 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 queryPaymentRunByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryPaymentRunByKey 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 OK * 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 queryPaymentRunByKeyAsync(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query PaymentRun by key with filters, expands, sort capabilities. Supported expands: N/A. * @param key Object ID or Number. (required) * @return QueryPaymentRunByKeyApi */ public QueryPaymentRunByKeyApi queryPaymentRunByKeyApi(String key) { return new QueryPaymentRunByKeyApi(key); } private okhttp3.Call queryPaymentRunsCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/payment-runs"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryPaymentRunsValidateBeforeCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { return queryPaymentRunsCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query PaymentRuns with filters, expands, sort capabilities. Supported expands: N/A. * @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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return QueryPaymentRunsResponse * @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 OK * 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 QueryPaymentRunsResponse queryPaymentRuns(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryPaymentRunsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryPaymentRunsWithHttpInfo(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryPaymentRunsValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryPaymentRunsAsync(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryPaymentRunsValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryPaymentRunsApi { private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryPaymentRunsApi() { } /** * 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 QueryPaymentRunsApi */ public QueryPaymentRunsApi 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 QueryPaymentRunsApi */ public QueryPaymentRunsApi 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 QueryPaymentRunsApi */ public QueryPaymentRunsApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryPaymentRunsApi */ public QueryPaymentRunsApi 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 QueryPaymentRunsApi */ public QueryPaymentRunsApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryPaymentRunsApi */ public QueryPaymentRunsApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryPaymentRunsApi */ public QueryPaymentRunsApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryPaymentRunsApi */ public QueryPaymentRunsApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryPaymentRunsApi */ public QueryPaymentRunsApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryPaymentRunsApi */ public QueryPaymentRunsApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryPaymentRunsApi */ public QueryPaymentRunsApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryPaymentRunsApi */ public QueryPaymentRunsApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryPaymentRuns * @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 OK * 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 queryPaymentRunsCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryPaymentRuns request * @return QueryPaymentRunsResponse * @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 OK * 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 QueryPaymentRunsResponse execute() throws ApiException { ApiResponse localVarResp = queryPaymentRunsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryPaymentRuns request with HTTP info returned * @return ApiResponse<QueryPaymentRunsResponse> * @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 OK * 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 queryPaymentRunsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryPaymentRuns 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 OK * 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 queryPaymentRunsAsync(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query PaymentRuns with filters, expands, sort capabilities. Supported expands: N/A. * @return QueryPaymentRunsApi */ public QueryPaymentRunsApi queryPaymentRunsApi() { return new QueryPaymentRunsApi(); } private okhttp3.Call queryPaymentScheduleByKeyCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/payment-schedules/{key}" .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryPaymentScheduleByKeyValidateBeforeCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { // verify the required parameter 'key' is set if (key == null) { throw new ApiException("Missing the required parameter 'key' when calling queryPaymentScheduleByKey(Async)"); } return queryPaymentScheduleByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query PaymentSchedule by key with filters, expands, sort capabilities. Supported expands: N/A. * @param key Object ID or Number. (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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return ExpandedPaymentSchedule * @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 OK * 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 ExpandedPaymentSchedule queryPaymentScheduleByKey(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryPaymentScheduleByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryPaymentScheduleByKeyWithHttpInfo(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryPaymentScheduleByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryPaymentScheduleByKeyAsync(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryPaymentScheduleByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryPaymentScheduleByKeyApi { private final String key; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryPaymentScheduleByKeyApi(String key) { this.key = key; } /** * 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 QueryPaymentScheduleByKeyApi */ public QueryPaymentScheduleByKeyApi 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 QueryPaymentScheduleByKeyApi */ public QueryPaymentScheduleByKeyApi 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 QueryPaymentScheduleByKeyApi */ public QueryPaymentScheduleByKeyApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryPaymentScheduleByKeyApi */ public QueryPaymentScheduleByKeyApi 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 QueryPaymentScheduleByKeyApi */ public QueryPaymentScheduleByKeyApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryPaymentScheduleByKeyApi */ public QueryPaymentScheduleByKeyApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryPaymentScheduleByKeyApi */ public QueryPaymentScheduleByKeyApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryPaymentScheduleByKeyApi */ public QueryPaymentScheduleByKeyApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryPaymentScheduleByKeyApi */ public QueryPaymentScheduleByKeyApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryPaymentScheduleByKeyApi */ public QueryPaymentScheduleByKeyApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryPaymentScheduleByKeyApi */ public QueryPaymentScheduleByKeyApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryPaymentScheduleByKeyApi */ public QueryPaymentScheduleByKeyApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryPaymentScheduleByKey * @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 OK * 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 queryPaymentScheduleByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryPaymentScheduleByKey request * @return ExpandedPaymentSchedule * @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 OK * 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 ExpandedPaymentSchedule execute() throws ApiException { ApiResponse localVarResp = queryPaymentScheduleByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryPaymentScheduleByKey request with HTTP info returned * @return ApiResponse<ExpandedPaymentSchedule> * @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 OK * 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 queryPaymentScheduleByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryPaymentScheduleByKey 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 OK * 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 queryPaymentScheduleByKeyAsync(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query PaymentSchedule by key with filters, expands, sort capabilities. Supported expands: N/A. * @param key Object ID or Number. (required) * @return QueryPaymentScheduleByKeyApi */ public QueryPaymentScheduleByKeyApi queryPaymentScheduleByKeyApi(String key) { return new QueryPaymentScheduleByKeyApi(key); } private okhttp3.Call queryPaymentScheduleItemByKeyCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/payment-schedule-items/{key}" .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryPaymentScheduleItemByKeyValidateBeforeCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { // verify the required parameter 'key' is set if (key == null) { throw new ApiException("Missing the required parameter 'key' when calling queryPaymentScheduleItemByKey(Async)"); } return queryPaymentScheduleItemByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query PaymentScheduleItem by key with filters, expands, sort capabilities. Supported expands: N/A. * @param key Object ID or Number. (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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return ExpandedPaymentScheduleItem * @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 OK * 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 ExpandedPaymentScheduleItem queryPaymentScheduleItemByKey(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryPaymentScheduleItemByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryPaymentScheduleItemByKeyWithHttpInfo(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryPaymentScheduleItemByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryPaymentScheduleItemByKeyAsync(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryPaymentScheduleItemByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryPaymentScheduleItemByKeyApi { private final String key; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryPaymentScheduleItemByKeyApi(String key) { this.key = key; } /** * 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 QueryPaymentScheduleItemByKeyApi */ public QueryPaymentScheduleItemByKeyApi 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 QueryPaymentScheduleItemByKeyApi */ public QueryPaymentScheduleItemByKeyApi 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 QueryPaymentScheduleItemByKeyApi */ public QueryPaymentScheduleItemByKeyApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryPaymentScheduleItemByKeyApi */ public QueryPaymentScheduleItemByKeyApi 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 QueryPaymentScheduleItemByKeyApi */ public QueryPaymentScheduleItemByKeyApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryPaymentScheduleItemByKeyApi */ public QueryPaymentScheduleItemByKeyApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryPaymentScheduleItemByKeyApi */ public QueryPaymentScheduleItemByKeyApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryPaymentScheduleItemByKeyApi */ public QueryPaymentScheduleItemByKeyApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryPaymentScheduleItemByKeyApi */ public QueryPaymentScheduleItemByKeyApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryPaymentScheduleItemByKeyApi */ public QueryPaymentScheduleItemByKeyApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryPaymentScheduleItemByKeyApi */ public QueryPaymentScheduleItemByKeyApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryPaymentScheduleItemByKeyApi */ public QueryPaymentScheduleItemByKeyApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryPaymentScheduleItemByKey * @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 OK * 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 queryPaymentScheduleItemByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryPaymentScheduleItemByKey request * @return ExpandedPaymentScheduleItem * @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 OK * 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 ExpandedPaymentScheduleItem execute() throws ApiException { ApiResponse localVarResp = queryPaymentScheduleItemByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryPaymentScheduleItemByKey request with HTTP info returned * @return ApiResponse<ExpandedPaymentScheduleItem> * @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 OK * 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 queryPaymentScheduleItemByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryPaymentScheduleItemByKey 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 OK * 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 queryPaymentScheduleItemByKeyAsync(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query PaymentScheduleItem by key with filters, expands, sort capabilities. Supported expands: N/A. * @param key Object ID or Number. (required) * @return QueryPaymentScheduleItemByKeyApi */ public QueryPaymentScheduleItemByKeyApi queryPaymentScheduleItemByKeyApi(String key) { return new QueryPaymentScheduleItemByKeyApi(key); } private okhttp3.Call queryPaymentScheduleItemsCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/payment-schedule-items"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryPaymentScheduleItemsValidateBeforeCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { return queryPaymentScheduleItemsCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query PaymentScheduleItems with filters, expands, sort capabilities. Supported expands: N/A. * @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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return QueryPaymentScheduleItemsResponse * @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 OK * 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 QueryPaymentScheduleItemsResponse queryPaymentScheduleItems(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryPaymentScheduleItemsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryPaymentScheduleItemsWithHttpInfo(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryPaymentScheduleItemsValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryPaymentScheduleItemsAsync(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryPaymentScheduleItemsValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryPaymentScheduleItemsApi { private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryPaymentScheduleItemsApi() { } /** * 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 QueryPaymentScheduleItemsApi */ public QueryPaymentScheduleItemsApi 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 QueryPaymentScheduleItemsApi */ public QueryPaymentScheduleItemsApi 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 QueryPaymentScheduleItemsApi */ public QueryPaymentScheduleItemsApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryPaymentScheduleItemsApi */ public QueryPaymentScheduleItemsApi 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 QueryPaymentScheduleItemsApi */ public QueryPaymentScheduleItemsApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryPaymentScheduleItemsApi */ public QueryPaymentScheduleItemsApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryPaymentScheduleItemsApi */ public QueryPaymentScheduleItemsApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryPaymentScheduleItemsApi */ public QueryPaymentScheduleItemsApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryPaymentScheduleItemsApi */ public QueryPaymentScheduleItemsApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryPaymentScheduleItemsApi */ public QueryPaymentScheduleItemsApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryPaymentScheduleItemsApi */ public QueryPaymentScheduleItemsApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryPaymentScheduleItemsApi */ public QueryPaymentScheduleItemsApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryPaymentScheduleItems * @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 OK * 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 queryPaymentScheduleItemsCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryPaymentScheduleItems request * @return QueryPaymentScheduleItemsResponse * @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 OK * 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 QueryPaymentScheduleItemsResponse execute() throws ApiException { ApiResponse localVarResp = queryPaymentScheduleItemsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryPaymentScheduleItems request with HTTP info returned * @return ApiResponse<QueryPaymentScheduleItemsResponse> * @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 OK * 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 queryPaymentScheduleItemsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryPaymentScheduleItems 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 OK * 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 queryPaymentScheduleItemsAsync(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query PaymentScheduleItems with filters, expands, sort capabilities. Supported expands: N/A. * @return QueryPaymentScheduleItemsApi */ public QueryPaymentScheduleItemsApi queryPaymentScheduleItemsApi() { return new QueryPaymentScheduleItemsApi(); } private okhttp3.Call queryPaymentSchedulesCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/payment-schedules"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryPaymentSchedulesValidateBeforeCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { return queryPaymentSchedulesCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query PaymentSchedules with filters, expands, sort capabilities. Supported expands: N/A. * @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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return QueryPaymentSchedulesResponse * @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 OK * 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 QueryPaymentSchedulesResponse queryPaymentSchedules(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryPaymentSchedulesWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryPaymentSchedulesWithHttpInfo(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryPaymentSchedulesValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryPaymentSchedulesAsync(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryPaymentSchedulesValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryPaymentSchedulesApi { private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryPaymentSchedulesApi() { } /** * 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 QueryPaymentSchedulesApi */ public QueryPaymentSchedulesApi 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 QueryPaymentSchedulesApi */ public QueryPaymentSchedulesApi 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 QueryPaymentSchedulesApi */ public QueryPaymentSchedulesApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryPaymentSchedulesApi */ public QueryPaymentSchedulesApi 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 QueryPaymentSchedulesApi */ public QueryPaymentSchedulesApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryPaymentSchedulesApi */ public QueryPaymentSchedulesApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryPaymentSchedulesApi */ public QueryPaymentSchedulesApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryPaymentSchedulesApi */ public QueryPaymentSchedulesApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryPaymentSchedulesApi */ public QueryPaymentSchedulesApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryPaymentSchedulesApi */ public QueryPaymentSchedulesApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryPaymentSchedulesApi */ public QueryPaymentSchedulesApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryPaymentSchedulesApi */ public QueryPaymentSchedulesApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryPaymentSchedules * @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 OK * 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 queryPaymentSchedulesCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryPaymentSchedules request * @return QueryPaymentSchedulesResponse * @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 OK * 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 QueryPaymentSchedulesResponse execute() throws ApiException { ApiResponse localVarResp = queryPaymentSchedulesWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryPaymentSchedules request with HTTP info returned * @return ApiResponse<QueryPaymentSchedulesResponse> * @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 OK * 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 queryPaymentSchedulesWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryPaymentSchedules 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 OK * 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 queryPaymentSchedulesAsync(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query PaymentSchedules with filters, expands, sort capabilities. Supported expands: N/A. * @return QueryPaymentSchedulesApi */ public QueryPaymentSchedulesApi queryPaymentSchedulesApi() { return new QueryPaymentSchedulesApi(); } private okhttp3.Call queryPaymentsCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/payments"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryPaymentsValidateBeforeCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { return queryPaymentsCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query Payments with filters, expands, sort capabilities. Supported expands: account,account.billto,account.soldto,paymentmethod,paymentapplications. * @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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return QueryPaymentsResponse * @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 OK * 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 QueryPaymentsResponse queryPayments(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryPaymentsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryPaymentsWithHttpInfo(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryPaymentsValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryPaymentsAsync(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryPaymentsValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryPaymentsApi { private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryPaymentsApi() { } /** * 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 QueryPaymentsApi */ public QueryPaymentsApi 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 QueryPaymentsApi */ public QueryPaymentsApi 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 QueryPaymentsApi */ public QueryPaymentsApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryPaymentsApi */ public QueryPaymentsApi 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 QueryPaymentsApi */ public QueryPaymentsApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryPaymentsApi */ public QueryPaymentsApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryPaymentsApi */ public QueryPaymentsApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryPaymentsApi */ public QueryPaymentsApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryPaymentsApi */ public QueryPaymentsApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryPaymentsApi */ public QueryPaymentsApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryPaymentsApi */ public QueryPaymentsApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryPaymentsApi */ public QueryPaymentsApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryPayments * @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 OK * 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 queryPaymentsCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryPayments request * @return QueryPaymentsResponse * @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 OK * 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 QueryPaymentsResponse execute() throws ApiException { ApiResponse localVarResp = queryPaymentsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryPayments request with HTTP info returned * @return ApiResponse<QueryPaymentsResponse> * @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 OK * 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 queryPaymentsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryPayments 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 OK * 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 queryPaymentsAsync(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query Payments with filters, expands, sort capabilities. Supported expands: account,account.billto,account.soldto,paymentmethod,paymentapplications. * @return QueryPaymentsApi */ public QueryPaymentsApi queryPaymentsApi() { return new QueryPaymentsApi(); } private okhttp3.Call queryPrepaidBalanceByKeyCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/prepaid-balances/{key}" .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryPrepaidBalanceByKeyValidateBeforeCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { // verify the required parameter 'key' is set if (key == null) { throw new ApiException("Missing the required parameter 'key' when calling queryPrepaidBalanceByKey(Async)"); } return queryPrepaidBalanceByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query PrepaidBalance by key with filters, expands, sort capabilities. Supported expands: account,origsubscription. * @param key Object ID or Number. (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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return ExpandedPrepaidBalance * @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 OK * 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 ExpandedPrepaidBalance queryPrepaidBalanceByKey(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryPrepaidBalanceByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryPrepaidBalanceByKeyWithHttpInfo(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryPrepaidBalanceByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryPrepaidBalanceByKeyAsync(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryPrepaidBalanceByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryPrepaidBalanceByKeyApi { private final String key; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryPrepaidBalanceByKeyApi(String key) { this.key = key; } /** * 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 QueryPrepaidBalanceByKeyApi */ public QueryPrepaidBalanceByKeyApi 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 QueryPrepaidBalanceByKeyApi */ public QueryPrepaidBalanceByKeyApi 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 QueryPrepaidBalanceByKeyApi */ public QueryPrepaidBalanceByKeyApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryPrepaidBalanceByKeyApi */ public QueryPrepaidBalanceByKeyApi 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 QueryPrepaidBalanceByKeyApi */ public QueryPrepaidBalanceByKeyApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryPrepaidBalanceByKeyApi */ public QueryPrepaidBalanceByKeyApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryPrepaidBalanceByKeyApi */ public QueryPrepaidBalanceByKeyApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryPrepaidBalanceByKeyApi */ public QueryPrepaidBalanceByKeyApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryPrepaidBalanceByKeyApi */ public QueryPrepaidBalanceByKeyApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryPrepaidBalanceByKeyApi */ public QueryPrepaidBalanceByKeyApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryPrepaidBalanceByKeyApi */ public QueryPrepaidBalanceByKeyApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryPrepaidBalanceByKeyApi */ public QueryPrepaidBalanceByKeyApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryPrepaidBalanceByKey * @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 OK * 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 queryPrepaidBalanceByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryPrepaidBalanceByKey request * @return ExpandedPrepaidBalance * @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 OK * 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 ExpandedPrepaidBalance execute() throws ApiException { ApiResponse localVarResp = queryPrepaidBalanceByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryPrepaidBalanceByKey request with HTTP info returned * @return ApiResponse<ExpandedPrepaidBalance> * @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 OK * 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 queryPrepaidBalanceByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryPrepaidBalanceByKey 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 OK * 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 queryPrepaidBalanceByKeyAsync(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query PrepaidBalance by key with filters, expands, sort capabilities. Supported expands: account,origsubscription. * @param key Object ID or Number. (required) * @return QueryPrepaidBalanceByKeyApi */ public QueryPrepaidBalanceByKeyApi queryPrepaidBalanceByKeyApi(String key) { return new QueryPrepaidBalanceByKeyApi(key); } private okhttp3.Call queryPrepaidBalanceFundByKeyCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/prepaid-balance-funds/{key}" .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryPrepaidBalanceFundByKeyValidateBeforeCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { // verify the required parameter 'key' is set if (key == null) { throw new ApiException("Missing the required parameter 'key' when calling queryPrepaidBalanceFundByKey(Async)"); } return queryPrepaidBalanceFundByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query PrepaidBalanceFund by key with filters, expands, sort capabilities. Supported expands: account,prepaidbalance,source,vpsummary. * @param key Object ID or Number. (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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return ExpandedPrepaidBalanceFund * @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 OK * 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 ExpandedPrepaidBalanceFund queryPrepaidBalanceFundByKey(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryPrepaidBalanceFundByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryPrepaidBalanceFundByKeyWithHttpInfo(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryPrepaidBalanceFundByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryPrepaidBalanceFundByKeyAsync(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryPrepaidBalanceFundByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryPrepaidBalanceFundByKeyApi { private final String key; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryPrepaidBalanceFundByKeyApi(String key) { this.key = key; } /** * 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 QueryPrepaidBalanceFundByKeyApi */ public QueryPrepaidBalanceFundByKeyApi 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 QueryPrepaidBalanceFundByKeyApi */ public QueryPrepaidBalanceFundByKeyApi 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 QueryPrepaidBalanceFundByKeyApi */ public QueryPrepaidBalanceFundByKeyApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryPrepaidBalanceFundByKeyApi */ public QueryPrepaidBalanceFundByKeyApi 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 QueryPrepaidBalanceFundByKeyApi */ public QueryPrepaidBalanceFundByKeyApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryPrepaidBalanceFundByKeyApi */ public QueryPrepaidBalanceFundByKeyApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryPrepaidBalanceFundByKeyApi */ public QueryPrepaidBalanceFundByKeyApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryPrepaidBalanceFundByKeyApi */ public QueryPrepaidBalanceFundByKeyApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryPrepaidBalanceFundByKeyApi */ public QueryPrepaidBalanceFundByKeyApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryPrepaidBalanceFundByKeyApi */ public QueryPrepaidBalanceFundByKeyApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryPrepaidBalanceFundByKeyApi */ public QueryPrepaidBalanceFundByKeyApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryPrepaidBalanceFundByKeyApi */ public QueryPrepaidBalanceFundByKeyApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryPrepaidBalanceFundByKey * @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 OK * 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 queryPrepaidBalanceFundByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryPrepaidBalanceFundByKey request * @return ExpandedPrepaidBalanceFund * @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 OK * 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 ExpandedPrepaidBalanceFund execute() throws ApiException { ApiResponse localVarResp = queryPrepaidBalanceFundByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryPrepaidBalanceFundByKey request with HTTP info returned * @return ApiResponse<ExpandedPrepaidBalanceFund> * @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 OK * 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 queryPrepaidBalanceFundByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryPrepaidBalanceFundByKey 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 OK * 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 queryPrepaidBalanceFundByKeyAsync(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query PrepaidBalanceFund by key with filters, expands, sort capabilities. Supported expands: account,prepaidbalance,source,vpsummary. * @param key Object ID or Number. (required) * @return QueryPrepaidBalanceFundByKeyApi */ public QueryPrepaidBalanceFundByKeyApi queryPrepaidBalanceFundByKeyApi(String key) { return new QueryPrepaidBalanceFundByKeyApi(key); } private okhttp3.Call queryPrepaidBalanceFundsCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/prepaid-balance-funds"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryPrepaidBalanceFundsValidateBeforeCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { return queryPrepaidBalanceFundsCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query PrepaidBalanceFunds with filters, expands, sort capabilities. Supported expands: account,prepaidbalance,source,vpsummary. * @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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return QueryPrepaidBalanceFundsResponse * @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 OK * 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 QueryPrepaidBalanceFundsResponse queryPrepaidBalanceFunds(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryPrepaidBalanceFundsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryPrepaidBalanceFundsWithHttpInfo(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryPrepaidBalanceFundsValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryPrepaidBalanceFundsAsync(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryPrepaidBalanceFundsValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryPrepaidBalanceFundsApi { private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryPrepaidBalanceFundsApi() { } /** * 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 QueryPrepaidBalanceFundsApi */ public QueryPrepaidBalanceFundsApi 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 QueryPrepaidBalanceFundsApi */ public QueryPrepaidBalanceFundsApi 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 QueryPrepaidBalanceFundsApi */ public QueryPrepaidBalanceFundsApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryPrepaidBalanceFundsApi */ public QueryPrepaidBalanceFundsApi 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 QueryPrepaidBalanceFundsApi */ public QueryPrepaidBalanceFundsApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryPrepaidBalanceFundsApi */ public QueryPrepaidBalanceFundsApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryPrepaidBalanceFundsApi */ public QueryPrepaidBalanceFundsApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryPrepaidBalanceFundsApi */ public QueryPrepaidBalanceFundsApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryPrepaidBalanceFundsApi */ public QueryPrepaidBalanceFundsApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryPrepaidBalanceFundsApi */ public QueryPrepaidBalanceFundsApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryPrepaidBalanceFundsApi */ public QueryPrepaidBalanceFundsApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryPrepaidBalanceFundsApi */ public QueryPrepaidBalanceFundsApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryPrepaidBalanceFunds * @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 OK * 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 queryPrepaidBalanceFundsCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryPrepaidBalanceFunds request * @return QueryPrepaidBalanceFundsResponse * @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 OK * 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 QueryPrepaidBalanceFundsResponse execute() throws ApiException { ApiResponse localVarResp = queryPrepaidBalanceFundsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryPrepaidBalanceFunds request with HTTP info returned * @return ApiResponse<QueryPrepaidBalanceFundsResponse> * @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 OK * 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 queryPrepaidBalanceFundsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryPrepaidBalanceFunds 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 OK * 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 queryPrepaidBalanceFundsAsync(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query PrepaidBalanceFunds with filters, expands, sort capabilities. Supported expands: account,prepaidbalance,source,vpsummary. * @return QueryPrepaidBalanceFundsApi */ public QueryPrepaidBalanceFundsApi queryPrepaidBalanceFundsApi() { return new QueryPrepaidBalanceFundsApi(); } private okhttp3.Call queryPrepaidBalanceTransactionByKeyCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/prepaid-balance-transactions/{key}" .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryPrepaidBalanceTransactionByKeyValidateBeforeCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { // verify the required parameter 'key' is set if (key == null) { throw new ApiException("Missing the required parameter 'key' when calling queryPrepaidBalanceTransactionByKey(Async)"); } return queryPrepaidBalanceTransactionByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query PrepaidBalanceTransaction by key with filters, expands, sort capabilities. Supported expands: account,prepaidbalance,fund,fund.source. * @param key Object ID or Number. (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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return ExpandedPrepaidBalanceTransaction * @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 OK * 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 ExpandedPrepaidBalanceTransaction queryPrepaidBalanceTransactionByKey(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryPrepaidBalanceTransactionByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryPrepaidBalanceTransactionByKeyWithHttpInfo(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryPrepaidBalanceTransactionByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryPrepaidBalanceTransactionByKeyAsync(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryPrepaidBalanceTransactionByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryPrepaidBalanceTransactionByKeyApi { private final String key; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryPrepaidBalanceTransactionByKeyApi(String key) { this.key = key; } /** * 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 QueryPrepaidBalanceTransactionByKeyApi */ public QueryPrepaidBalanceTransactionByKeyApi 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 QueryPrepaidBalanceTransactionByKeyApi */ public QueryPrepaidBalanceTransactionByKeyApi 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 QueryPrepaidBalanceTransactionByKeyApi */ public QueryPrepaidBalanceTransactionByKeyApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryPrepaidBalanceTransactionByKeyApi */ public QueryPrepaidBalanceTransactionByKeyApi 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 QueryPrepaidBalanceTransactionByKeyApi */ public QueryPrepaidBalanceTransactionByKeyApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryPrepaidBalanceTransactionByKeyApi */ public QueryPrepaidBalanceTransactionByKeyApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryPrepaidBalanceTransactionByKeyApi */ public QueryPrepaidBalanceTransactionByKeyApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryPrepaidBalanceTransactionByKeyApi */ public QueryPrepaidBalanceTransactionByKeyApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryPrepaidBalanceTransactionByKeyApi */ public QueryPrepaidBalanceTransactionByKeyApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryPrepaidBalanceTransactionByKeyApi */ public QueryPrepaidBalanceTransactionByKeyApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryPrepaidBalanceTransactionByKeyApi */ public QueryPrepaidBalanceTransactionByKeyApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryPrepaidBalanceTransactionByKeyApi */ public QueryPrepaidBalanceTransactionByKeyApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryPrepaidBalanceTransactionByKey * @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 OK * 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 queryPrepaidBalanceTransactionByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryPrepaidBalanceTransactionByKey request * @return ExpandedPrepaidBalanceTransaction * @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 OK * 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 ExpandedPrepaidBalanceTransaction execute() throws ApiException { ApiResponse localVarResp = queryPrepaidBalanceTransactionByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryPrepaidBalanceTransactionByKey request with HTTP info returned * @return ApiResponse<ExpandedPrepaidBalanceTransaction> * @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 OK * 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 queryPrepaidBalanceTransactionByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryPrepaidBalanceTransactionByKey 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 OK * 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 queryPrepaidBalanceTransactionByKeyAsync(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query PrepaidBalanceTransaction by key with filters, expands, sort capabilities. Supported expands: account,prepaidbalance,fund,fund.source. * @param key Object ID or Number. (required) * @return QueryPrepaidBalanceTransactionByKeyApi */ public QueryPrepaidBalanceTransactionByKeyApi queryPrepaidBalanceTransactionByKeyApi(String key) { return new QueryPrepaidBalanceTransactionByKeyApi(key); } private okhttp3.Call queryPrepaidBalanceTransactionsCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/prepaid-balance-transactions"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryPrepaidBalanceTransactionsValidateBeforeCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { return queryPrepaidBalanceTransactionsCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query PrepaidBalanceTransactions with filters, expands, sort capabilities. Supported expands: account,prepaidbalance,fund,fund.source. * @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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return QueryPrepaidBalanceTransactionsResponse * @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 OK * 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 QueryPrepaidBalanceTransactionsResponse queryPrepaidBalanceTransactions(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryPrepaidBalanceTransactionsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryPrepaidBalanceTransactionsWithHttpInfo(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryPrepaidBalanceTransactionsValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryPrepaidBalanceTransactionsAsync(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryPrepaidBalanceTransactionsValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryPrepaidBalanceTransactionsApi { private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryPrepaidBalanceTransactionsApi() { } /** * 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 QueryPrepaidBalanceTransactionsApi */ public QueryPrepaidBalanceTransactionsApi 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 QueryPrepaidBalanceTransactionsApi */ public QueryPrepaidBalanceTransactionsApi 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 QueryPrepaidBalanceTransactionsApi */ public QueryPrepaidBalanceTransactionsApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryPrepaidBalanceTransactionsApi */ public QueryPrepaidBalanceTransactionsApi 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 QueryPrepaidBalanceTransactionsApi */ public QueryPrepaidBalanceTransactionsApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryPrepaidBalanceTransactionsApi */ public QueryPrepaidBalanceTransactionsApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryPrepaidBalanceTransactionsApi */ public QueryPrepaidBalanceTransactionsApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryPrepaidBalanceTransactionsApi */ public QueryPrepaidBalanceTransactionsApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryPrepaidBalanceTransactionsApi */ public QueryPrepaidBalanceTransactionsApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryPrepaidBalanceTransactionsApi */ public QueryPrepaidBalanceTransactionsApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryPrepaidBalanceTransactionsApi */ public QueryPrepaidBalanceTransactionsApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryPrepaidBalanceTransactionsApi */ public QueryPrepaidBalanceTransactionsApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryPrepaidBalanceTransactions * @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 OK * 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 queryPrepaidBalanceTransactionsCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryPrepaidBalanceTransactions request * @return QueryPrepaidBalanceTransactionsResponse * @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 OK * 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 QueryPrepaidBalanceTransactionsResponse execute() throws ApiException { ApiResponse localVarResp = queryPrepaidBalanceTransactionsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryPrepaidBalanceTransactions request with HTTP info returned * @return ApiResponse<QueryPrepaidBalanceTransactionsResponse> * @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 OK * 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 queryPrepaidBalanceTransactionsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryPrepaidBalanceTransactions 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 OK * 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 queryPrepaidBalanceTransactionsAsync(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query PrepaidBalanceTransactions with filters, expands, sort capabilities. Supported expands: account,prepaidbalance,fund,fund.source. * @return QueryPrepaidBalanceTransactionsApi */ public QueryPrepaidBalanceTransactionsApi queryPrepaidBalanceTransactionsApi() { return new QueryPrepaidBalanceTransactionsApi(); } private okhttp3.Call queryPrepaidBalancesCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/prepaid-balances"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryPrepaidBalancesValidateBeforeCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { return queryPrepaidBalancesCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query PrepaidBalances with filters, expands, sort capabilities. Supported expands: account,origsubscription. * @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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return QueryPrepaidBalancesResponse * @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 OK * 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 QueryPrepaidBalancesResponse queryPrepaidBalances(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryPrepaidBalancesWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryPrepaidBalancesWithHttpInfo(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryPrepaidBalancesValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryPrepaidBalancesAsync(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryPrepaidBalancesValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryPrepaidBalancesApi { private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryPrepaidBalancesApi() { } /** * 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 QueryPrepaidBalancesApi */ public QueryPrepaidBalancesApi 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 QueryPrepaidBalancesApi */ public QueryPrepaidBalancesApi 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 QueryPrepaidBalancesApi */ public QueryPrepaidBalancesApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryPrepaidBalancesApi */ public QueryPrepaidBalancesApi 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 QueryPrepaidBalancesApi */ public QueryPrepaidBalancesApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryPrepaidBalancesApi */ public QueryPrepaidBalancesApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryPrepaidBalancesApi */ public QueryPrepaidBalancesApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryPrepaidBalancesApi */ public QueryPrepaidBalancesApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryPrepaidBalancesApi */ public QueryPrepaidBalancesApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryPrepaidBalancesApi */ public QueryPrepaidBalancesApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryPrepaidBalancesApi */ public QueryPrepaidBalancesApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryPrepaidBalancesApi */ public QueryPrepaidBalancesApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryPrepaidBalances * @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 OK * 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 queryPrepaidBalancesCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryPrepaidBalances request * @return QueryPrepaidBalancesResponse * @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 OK * 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 QueryPrepaidBalancesResponse execute() throws ApiException { ApiResponse localVarResp = queryPrepaidBalancesWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryPrepaidBalances request with HTTP info returned * @return ApiResponse<QueryPrepaidBalancesResponse> * @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 OK * 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 queryPrepaidBalancesWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryPrepaidBalances 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 OK * 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 queryPrepaidBalancesAsync(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query PrepaidBalances with filters, expands, sort capabilities. Supported expands: account,origsubscription. * @return QueryPrepaidBalancesApi */ public QueryPrepaidBalancesApi queryPrepaidBalancesApi() { return new QueryPrepaidBalancesApi(); } private okhttp3.Call queryProcessedUsageByKeyCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/processed-usages/{key}" .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryProcessedUsageByKeyValidateBeforeCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { // verify the required parameter 'key' is set if (key == null) { throw new ApiException("Missing the required parameter 'key' when calling queryProcessedUsageByKey(Async)"); } return queryProcessedUsageByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query ProcessedUsage by key with filters, expands, sort capabilities. Supported expands: usage,invoiceitem,creditmemoitem. * @param key Object ID or Number. (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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return ExpandedProcessedUsage * @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 OK * 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 ExpandedProcessedUsage queryProcessedUsageByKey(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryProcessedUsageByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryProcessedUsageByKeyWithHttpInfo(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryProcessedUsageByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryProcessedUsageByKeyAsync(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryProcessedUsageByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryProcessedUsageByKeyApi { private final String key; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryProcessedUsageByKeyApi(String key) { this.key = key; } /** * 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 QueryProcessedUsageByKeyApi */ public QueryProcessedUsageByKeyApi 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 QueryProcessedUsageByKeyApi */ public QueryProcessedUsageByKeyApi 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 QueryProcessedUsageByKeyApi */ public QueryProcessedUsageByKeyApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryProcessedUsageByKeyApi */ public QueryProcessedUsageByKeyApi 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 QueryProcessedUsageByKeyApi */ public QueryProcessedUsageByKeyApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryProcessedUsageByKeyApi */ public QueryProcessedUsageByKeyApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryProcessedUsageByKeyApi */ public QueryProcessedUsageByKeyApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryProcessedUsageByKeyApi */ public QueryProcessedUsageByKeyApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryProcessedUsageByKeyApi */ public QueryProcessedUsageByKeyApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryProcessedUsageByKeyApi */ public QueryProcessedUsageByKeyApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryProcessedUsageByKeyApi */ public QueryProcessedUsageByKeyApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryProcessedUsageByKeyApi */ public QueryProcessedUsageByKeyApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryProcessedUsageByKey * @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 OK * 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 queryProcessedUsageByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryProcessedUsageByKey request * @return ExpandedProcessedUsage * @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 OK * 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 ExpandedProcessedUsage execute() throws ApiException { ApiResponse localVarResp = queryProcessedUsageByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryProcessedUsageByKey request with HTTP info returned * @return ApiResponse<ExpandedProcessedUsage> * @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 OK * 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 queryProcessedUsageByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryProcessedUsageByKey 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 OK * 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 queryProcessedUsageByKeyAsync(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query ProcessedUsage by key with filters, expands, sort capabilities. Supported expands: usage,invoiceitem,creditmemoitem. * @param key Object ID or Number. (required) * @return QueryProcessedUsageByKeyApi */ public QueryProcessedUsageByKeyApi queryProcessedUsageByKeyApi(String key) { return new QueryProcessedUsageByKeyApi(key); } private okhttp3.Call queryProcessedUsagesCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/processed-usages"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryProcessedUsagesValidateBeforeCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { return queryProcessedUsagesCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query ProcessedUsages with filters, expands, sort capabilities. Supported expands: usage,invoiceitem,creditmemoitem. * @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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return QueryProcessedUsagesResponse * @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 OK * 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 QueryProcessedUsagesResponse queryProcessedUsages(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryProcessedUsagesWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryProcessedUsagesWithHttpInfo(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryProcessedUsagesValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryProcessedUsagesAsync(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryProcessedUsagesValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryProcessedUsagesApi { private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryProcessedUsagesApi() { } /** * 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 QueryProcessedUsagesApi */ public QueryProcessedUsagesApi 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 QueryProcessedUsagesApi */ public QueryProcessedUsagesApi 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 QueryProcessedUsagesApi */ public QueryProcessedUsagesApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryProcessedUsagesApi */ public QueryProcessedUsagesApi 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 QueryProcessedUsagesApi */ public QueryProcessedUsagesApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryProcessedUsagesApi */ public QueryProcessedUsagesApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryProcessedUsagesApi */ public QueryProcessedUsagesApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryProcessedUsagesApi */ public QueryProcessedUsagesApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryProcessedUsagesApi */ public QueryProcessedUsagesApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryProcessedUsagesApi */ public QueryProcessedUsagesApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryProcessedUsagesApi */ public QueryProcessedUsagesApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryProcessedUsagesApi */ public QueryProcessedUsagesApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryProcessedUsages * @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 OK * 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 queryProcessedUsagesCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryProcessedUsages request * @return QueryProcessedUsagesResponse * @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 OK * 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 QueryProcessedUsagesResponse execute() throws ApiException { ApiResponse localVarResp = queryProcessedUsagesWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryProcessedUsages request with HTTP info returned * @return ApiResponse<QueryProcessedUsagesResponse> * @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 OK * 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 queryProcessedUsagesWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryProcessedUsages 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 OK * 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 queryProcessedUsagesAsync(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query ProcessedUsages with filters, expands, sort capabilities. Supported expands: usage,invoiceitem,creditmemoitem. * @return QueryProcessedUsagesApi */ public QueryProcessedUsagesApi queryProcessedUsagesApi() { return new QueryProcessedUsagesApi(); } private okhttp3.Call queryProductByKeyCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/products/{key}" .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryProductByKeyValidateBeforeCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { // verify the required parameter 'key' is set if (key == null) { throw new ApiException("Missing the required parameter 'key' when calling queryProductByKey(Async)"); } return queryProductByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query Product by key with filters, expands, sort capabilities. Supported expands: productrateplans,productrateplans.productrateplancharges,productrateplans.productrateplancharges.productrateplanchargetiers. * @param key Object ID or Number. (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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return ExpandedProduct * @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 OK * 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 ExpandedProduct queryProductByKey(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryProductByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryProductByKeyWithHttpInfo(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryProductByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryProductByKeyAsync(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryProductByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryProductByKeyApi { private final String key; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryProductByKeyApi(String key) { this.key = key; } /** * 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 QueryProductByKeyApi */ public QueryProductByKeyApi 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 QueryProductByKeyApi */ public QueryProductByKeyApi 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 QueryProductByKeyApi */ public QueryProductByKeyApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryProductByKeyApi */ public QueryProductByKeyApi 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 QueryProductByKeyApi */ public QueryProductByKeyApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryProductByKeyApi */ public QueryProductByKeyApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryProductByKeyApi */ public QueryProductByKeyApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryProductByKeyApi */ public QueryProductByKeyApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryProductByKeyApi */ public QueryProductByKeyApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryProductByKeyApi */ public QueryProductByKeyApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryProductByKeyApi */ public QueryProductByKeyApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryProductByKeyApi */ public QueryProductByKeyApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryProductByKey * @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 OK * 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 queryProductByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryProductByKey request * @return ExpandedProduct * @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 OK * 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 ExpandedProduct execute() throws ApiException { ApiResponse localVarResp = queryProductByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryProductByKey request with HTTP info returned * @return ApiResponse<ExpandedProduct> * @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 OK * 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 queryProductByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryProductByKey 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 OK * 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 queryProductByKeyAsync(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query Product by key with filters, expands, sort capabilities. Supported expands: productrateplans,productrateplans.productrateplancharges,productrateplans.productrateplancharges.productrateplanchargetiers. * @param key Object ID or Number. (required) * @return QueryProductByKeyApi */ public QueryProductByKeyApi queryProductByKeyApi(String key) { return new QueryProductByKeyApi(key); } private okhttp3.Call queryProductRatePlanByKeyCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/product-rate-plans/{key}" .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryProductRatePlanByKeyValidateBeforeCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { // verify the required parameter 'key' is set if (key == null) { throw new ApiException("Missing the required parameter 'key' when calling queryProductRatePlanByKey(Async)"); } return queryProductRatePlanByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query ProductRatePlan by key with filters, expands, sort capabilities. Supported expands: product,productrateplancharges,productrateplancharges.productrateplanchargetiers,externalproductrateplans. * @param key Object ID or Number. (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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return ExpandedProductRatePlan * @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 OK * 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 ExpandedProductRatePlan queryProductRatePlanByKey(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryProductRatePlanByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryProductRatePlanByKeyWithHttpInfo(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryProductRatePlanByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryProductRatePlanByKeyAsync(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryProductRatePlanByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryProductRatePlanByKeyApi { private final String key; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryProductRatePlanByKeyApi(String key) { this.key = key; } /** * 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 QueryProductRatePlanByKeyApi */ public QueryProductRatePlanByKeyApi 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 QueryProductRatePlanByKeyApi */ public QueryProductRatePlanByKeyApi 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 QueryProductRatePlanByKeyApi */ public QueryProductRatePlanByKeyApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryProductRatePlanByKeyApi */ public QueryProductRatePlanByKeyApi 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 QueryProductRatePlanByKeyApi */ public QueryProductRatePlanByKeyApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryProductRatePlanByKeyApi */ public QueryProductRatePlanByKeyApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryProductRatePlanByKeyApi */ public QueryProductRatePlanByKeyApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryProductRatePlanByKeyApi */ public QueryProductRatePlanByKeyApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryProductRatePlanByKeyApi */ public QueryProductRatePlanByKeyApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryProductRatePlanByKeyApi */ public QueryProductRatePlanByKeyApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryProductRatePlanByKeyApi */ public QueryProductRatePlanByKeyApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryProductRatePlanByKeyApi */ public QueryProductRatePlanByKeyApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryProductRatePlanByKey * @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 OK * 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 queryProductRatePlanByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryProductRatePlanByKey request * @return ExpandedProductRatePlan * @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 OK * 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 ExpandedProductRatePlan execute() throws ApiException { ApiResponse localVarResp = queryProductRatePlanByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryProductRatePlanByKey request with HTTP info returned * @return ApiResponse<ExpandedProductRatePlan> * @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 OK * 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 queryProductRatePlanByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryProductRatePlanByKey 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 OK * 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 queryProductRatePlanByKeyAsync(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query ProductRatePlan by key with filters, expands, sort capabilities. Supported expands: product,productrateplancharges,productrateplancharges.productrateplanchargetiers,externalproductrateplans. * @param key Object ID or Number. (required) * @return QueryProductRatePlanByKeyApi */ public QueryProductRatePlanByKeyApi queryProductRatePlanByKeyApi(String key) { return new QueryProductRatePlanByKeyApi(key); } private okhttp3.Call queryProductRatePlanChargeByKeyCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/product-rate-plan-charges/{key}" .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryProductRatePlanChargeByKeyValidateBeforeCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { // verify the required parameter 'key' is set if (key == null) { throw new ApiException("Missing the required parameter 'key' when calling queryProductRatePlanChargeByKey(Async)"); } return queryProductRatePlanChargeByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query ProductRatePlanCharge by key with filters, expands, sort capabilities. Supported expands: productrateplan,productrateplanchargetiers. * @param key Object ID or Number. (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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return ExpandedProductRatePlanCharge * @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 OK * 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 ExpandedProductRatePlanCharge queryProductRatePlanChargeByKey(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryProductRatePlanChargeByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryProductRatePlanChargeByKeyWithHttpInfo(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryProductRatePlanChargeByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryProductRatePlanChargeByKeyAsync(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryProductRatePlanChargeByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryProductRatePlanChargeByKeyApi { private final String key; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryProductRatePlanChargeByKeyApi(String key) { this.key = key; } /** * 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 QueryProductRatePlanChargeByKeyApi */ public QueryProductRatePlanChargeByKeyApi 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 QueryProductRatePlanChargeByKeyApi */ public QueryProductRatePlanChargeByKeyApi 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 QueryProductRatePlanChargeByKeyApi */ public QueryProductRatePlanChargeByKeyApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryProductRatePlanChargeByKeyApi */ public QueryProductRatePlanChargeByKeyApi 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 QueryProductRatePlanChargeByKeyApi */ public QueryProductRatePlanChargeByKeyApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryProductRatePlanChargeByKeyApi */ public QueryProductRatePlanChargeByKeyApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryProductRatePlanChargeByKeyApi */ public QueryProductRatePlanChargeByKeyApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryProductRatePlanChargeByKeyApi */ public QueryProductRatePlanChargeByKeyApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryProductRatePlanChargeByKeyApi */ public QueryProductRatePlanChargeByKeyApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryProductRatePlanChargeByKeyApi */ public QueryProductRatePlanChargeByKeyApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryProductRatePlanChargeByKeyApi */ public QueryProductRatePlanChargeByKeyApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryProductRatePlanChargeByKeyApi */ public QueryProductRatePlanChargeByKeyApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryProductRatePlanChargeByKey * @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 OK * 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 queryProductRatePlanChargeByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryProductRatePlanChargeByKey request * @return ExpandedProductRatePlanCharge * @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 OK * 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 ExpandedProductRatePlanCharge execute() throws ApiException { ApiResponse localVarResp = queryProductRatePlanChargeByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryProductRatePlanChargeByKey request with HTTP info returned * @return ApiResponse<ExpandedProductRatePlanCharge> * @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 OK * 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 queryProductRatePlanChargeByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryProductRatePlanChargeByKey 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 OK * 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 queryProductRatePlanChargeByKeyAsync(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query ProductRatePlanCharge by key with filters, expands, sort capabilities. Supported expands: productrateplan,productrateplanchargetiers. * @param key Object ID or Number. (required) * @return QueryProductRatePlanChargeByKeyApi */ public QueryProductRatePlanChargeByKeyApi queryProductRatePlanChargeByKeyApi(String key) { return new QueryProductRatePlanChargeByKeyApi(key); } private okhttp3.Call queryProductRatePlanChargeTierByKeyCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/product-rate-plan-charge-tiers/{key}" .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryProductRatePlanChargeTierByKeyValidateBeforeCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { // verify the required parameter 'key' is set if (key == null) { throw new ApiException("Missing the required parameter 'key' when calling queryProductRatePlanChargeTierByKey(Async)"); } return queryProductRatePlanChargeTierByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query ProductRatePlanChargeTier by key with filters, expands, sort capabilities. Supported expands: productrateplancharge. * @param key Object ID or Number. (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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return ExpandedProductRatePlanChargeTier * @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 OK * 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 ExpandedProductRatePlanChargeTier queryProductRatePlanChargeTierByKey(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryProductRatePlanChargeTierByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryProductRatePlanChargeTierByKeyWithHttpInfo(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryProductRatePlanChargeTierByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryProductRatePlanChargeTierByKeyAsync(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryProductRatePlanChargeTierByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryProductRatePlanChargeTierByKeyApi { private final String key; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryProductRatePlanChargeTierByKeyApi(String key) { this.key = key; } /** * 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 QueryProductRatePlanChargeTierByKeyApi */ public QueryProductRatePlanChargeTierByKeyApi 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 QueryProductRatePlanChargeTierByKeyApi */ public QueryProductRatePlanChargeTierByKeyApi 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 QueryProductRatePlanChargeTierByKeyApi */ public QueryProductRatePlanChargeTierByKeyApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryProductRatePlanChargeTierByKeyApi */ public QueryProductRatePlanChargeTierByKeyApi 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 QueryProductRatePlanChargeTierByKeyApi */ public QueryProductRatePlanChargeTierByKeyApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryProductRatePlanChargeTierByKeyApi */ public QueryProductRatePlanChargeTierByKeyApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryProductRatePlanChargeTierByKeyApi */ public QueryProductRatePlanChargeTierByKeyApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryProductRatePlanChargeTierByKeyApi */ public QueryProductRatePlanChargeTierByKeyApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryProductRatePlanChargeTierByKeyApi */ public QueryProductRatePlanChargeTierByKeyApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryProductRatePlanChargeTierByKeyApi */ public QueryProductRatePlanChargeTierByKeyApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryProductRatePlanChargeTierByKeyApi */ public QueryProductRatePlanChargeTierByKeyApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryProductRatePlanChargeTierByKeyApi */ public QueryProductRatePlanChargeTierByKeyApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryProductRatePlanChargeTierByKey * @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 OK * 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 queryProductRatePlanChargeTierByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryProductRatePlanChargeTierByKey request * @return ExpandedProductRatePlanChargeTier * @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 OK * 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 ExpandedProductRatePlanChargeTier execute() throws ApiException { ApiResponse localVarResp = queryProductRatePlanChargeTierByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryProductRatePlanChargeTierByKey request with HTTP info returned * @return ApiResponse<ExpandedProductRatePlanChargeTier> * @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 OK * 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 queryProductRatePlanChargeTierByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryProductRatePlanChargeTierByKey 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 OK * 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 queryProductRatePlanChargeTierByKeyAsync(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query ProductRatePlanChargeTier by key with filters, expands, sort capabilities. Supported expands: productrateplancharge. * @param key Object ID or Number. (required) * @return QueryProductRatePlanChargeTierByKeyApi */ public QueryProductRatePlanChargeTierByKeyApi queryProductRatePlanChargeTierByKeyApi(String key) { return new QueryProductRatePlanChargeTierByKeyApi(key); } private okhttp3.Call queryProductRatePlanChargeTiersCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/product-rate-plan-charge-tiers"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryProductRatePlanChargeTiersValidateBeforeCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { return queryProductRatePlanChargeTiersCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query ProductRatePlanChargeTiers with filters, expands, sort capabilities. Supported expands: productrateplancharge. * @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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return QueryProductRatePlanChargeTiersResponse * @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 OK * 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 QueryProductRatePlanChargeTiersResponse queryProductRatePlanChargeTiers(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryProductRatePlanChargeTiersWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryProductRatePlanChargeTiersWithHttpInfo(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryProductRatePlanChargeTiersValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryProductRatePlanChargeTiersAsync(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryProductRatePlanChargeTiersValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryProductRatePlanChargeTiersApi { private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryProductRatePlanChargeTiersApi() { } /** * 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 QueryProductRatePlanChargeTiersApi */ public QueryProductRatePlanChargeTiersApi 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 QueryProductRatePlanChargeTiersApi */ public QueryProductRatePlanChargeTiersApi 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 QueryProductRatePlanChargeTiersApi */ public QueryProductRatePlanChargeTiersApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryProductRatePlanChargeTiersApi */ public QueryProductRatePlanChargeTiersApi 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 QueryProductRatePlanChargeTiersApi */ public QueryProductRatePlanChargeTiersApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryProductRatePlanChargeTiersApi */ public QueryProductRatePlanChargeTiersApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryProductRatePlanChargeTiersApi */ public QueryProductRatePlanChargeTiersApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryProductRatePlanChargeTiersApi */ public QueryProductRatePlanChargeTiersApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryProductRatePlanChargeTiersApi */ public QueryProductRatePlanChargeTiersApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryProductRatePlanChargeTiersApi */ public QueryProductRatePlanChargeTiersApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryProductRatePlanChargeTiersApi */ public QueryProductRatePlanChargeTiersApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryProductRatePlanChargeTiersApi */ public QueryProductRatePlanChargeTiersApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryProductRatePlanChargeTiers * @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 OK * 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 queryProductRatePlanChargeTiersCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryProductRatePlanChargeTiers request * @return QueryProductRatePlanChargeTiersResponse * @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 OK * 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 QueryProductRatePlanChargeTiersResponse execute() throws ApiException { ApiResponse localVarResp = queryProductRatePlanChargeTiersWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryProductRatePlanChargeTiers request with HTTP info returned * @return ApiResponse<QueryProductRatePlanChargeTiersResponse> * @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 OK * 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 queryProductRatePlanChargeTiersWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryProductRatePlanChargeTiers 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 OK * 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 queryProductRatePlanChargeTiersAsync(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query ProductRatePlanChargeTiers with filters, expands, sort capabilities. Supported expands: productrateplancharge. * @return QueryProductRatePlanChargeTiersApi */ public QueryProductRatePlanChargeTiersApi queryProductRatePlanChargeTiersApi() { return new QueryProductRatePlanChargeTiersApi(); } private okhttp3.Call queryProductRatePlanChargesCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/product-rate-plan-charges"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryProductRatePlanChargesValidateBeforeCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { return queryProductRatePlanChargesCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query ProductRatePlanCharges with filters, expands, sort capabilities. Supported expands: productrateplan,productrateplanchargetiers. * @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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return QueryProductRatePlanChargesResponse * @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 OK * 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 QueryProductRatePlanChargesResponse queryProductRatePlanCharges(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryProductRatePlanChargesWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryProductRatePlanChargesWithHttpInfo(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryProductRatePlanChargesValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryProductRatePlanChargesAsync(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryProductRatePlanChargesValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryProductRatePlanChargesApi { private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryProductRatePlanChargesApi() { } /** * 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 QueryProductRatePlanChargesApi */ public QueryProductRatePlanChargesApi 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 QueryProductRatePlanChargesApi */ public QueryProductRatePlanChargesApi 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 QueryProductRatePlanChargesApi */ public QueryProductRatePlanChargesApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryProductRatePlanChargesApi */ public QueryProductRatePlanChargesApi 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 QueryProductRatePlanChargesApi */ public QueryProductRatePlanChargesApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryProductRatePlanChargesApi */ public QueryProductRatePlanChargesApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryProductRatePlanChargesApi */ public QueryProductRatePlanChargesApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryProductRatePlanChargesApi */ public QueryProductRatePlanChargesApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryProductRatePlanChargesApi */ public QueryProductRatePlanChargesApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryProductRatePlanChargesApi */ public QueryProductRatePlanChargesApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryProductRatePlanChargesApi */ public QueryProductRatePlanChargesApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryProductRatePlanChargesApi */ public QueryProductRatePlanChargesApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryProductRatePlanCharges * @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 OK * 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 queryProductRatePlanChargesCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryProductRatePlanCharges request * @return QueryProductRatePlanChargesResponse * @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 OK * 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 QueryProductRatePlanChargesResponse execute() throws ApiException { ApiResponse localVarResp = queryProductRatePlanChargesWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryProductRatePlanCharges request with HTTP info returned * @return ApiResponse<QueryProductRatePlanChargesResponse> * @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 OK * 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 queryProductRatePlanChargesWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryProductRatePlanCharges 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 OK * 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 queryProductRatePlanChargesAsync(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query ProductRatePlanCharges with filters, expands, sort capabilities. Supported expands: productrateplan,productrateplanchargetiers. * @return QueryProductRatePlanChargesApi */ public QueryProductRatePlanChargesApi queryProductRatePlanChargesApi() { return new QueryProductRatePlanChargesApi(); } private okhttp3.Call queryProductRatePlansCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/product-rate-plans"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryProductRatePlansValidateBeforeCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { return queryProductRatePlansCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query ProductRatePlans with filters, expands, sort capabilities. Supported expands: product,productrateplancharges,productrateplancharges.productrateplanchargetiers,externalproductrateplans. * @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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return QueryProductRatePlansResponse * @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 OK * 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 QueryProductRatePlansResponse queryProductRatePlans(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryProductRatePlansWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryProductRatePlansWithHttpInfo(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryProductRatePlansValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryProductRatePlansAsync(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryProductRatePlansValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryProductRatePlansApi { private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryProductRatePlansApi() { } /** * 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 QueryProductRatePlansApi */ public QueryProductRatePlansApi 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 QueryProductRatePlansApi */ public QueryProductRatePlansApi 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 QueryProductRatePlansApi */ public QueryProductRatePlansApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryProductRatePlansApi */ public QueryProductRatePlansApi 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 QueryProductRatePlansApi */ public QueryProductRatePlansApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryProductRatePlansApi */ public QueryProductRatePlansApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryProductRatePlansApi */ public QueryProductRatePlansApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryProductRatePlansApi */ public QueryProductRatePlansApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryProductRatePlansApi */ public QueryProductRatePlansApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryProductRatePlansApi */ public QueryProductRatePlansApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryProductRatePlansApi */ public QueryProductRatePlansApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryProductRatePlansApi */ public QueryProductRatePlansApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryProductRatePlans * @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 OK * 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 queryProductRatePlansCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryProductRatePlans request * @return QueryProductRatePlansResponse * @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 OK * 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 QueryProductRatePlansResponse execute() throws ApiException { ApiResponse localVarResp = queryProductRatePlansWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryProductRatePlans request with HTTP info returned * @return ApiResponse<QueryProductRatePlansResponse> * @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 OK * 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 queryProductRatePlansWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryProductRatePlans 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 OK * 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 queryProductRatePlansAsync(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query ProductRatePlans with filters, expands, sort capabilities. Supported expands: product,productrateplancharges,productrateplancharges.productrateplanchargetiers,externalproductrateplans. * @return QueryProductRatePlansApi */ public QueryProductRatePlansApi queryProductRatePlansApi() { return new QueryProductRatePlansApi(); } private okhttp3.Call queryProductsCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/products"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryProductsValidateBeforeCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { return queryProductsCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query Products with filters, expands, sort capabilities. Supported expands: productrateplans,productrateplans.productrateplancharges,productrateplans.productrateplancharges.productrateplanchargetiers. * @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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return QueryProductsResponse * @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 OK * 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 QueryProductsResponse queryProducts(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryProductsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryProductsWithHttpInfo(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryProductsValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryProductsAsync(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryProductsValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryProductsApi { private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryProductsApi() { } /** * 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 QueryProductsApi */ public QueryProductsApi 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 QueryProductsApi */ public QueryProductsApi 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 QueryProductsApi */ public QueryProductsApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryProductsApi */ public QueryProductsApi 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 QueryProductsApi */ public QueryProductsApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryProductsApi */ public QueryProductsApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryProductsApi */ public QueryProductsApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryProductsApi */ public QueryProductsApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryProductsApi */ public QueryProductsApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryProductsApi */ public QueryProductsApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryProductsApi */ public QueryProductsApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryProductsApi */ public QueryProductsApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryProducts * @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 OK * 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 queryProductsCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryProducts request * @return QueryProductsResponse * @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 OK * 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 QueryProductsResponse execute() throws ApiException { ApiResponse localVarResp = queryProductsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryProducts request with HTTP info returned * @return ApiResponse<QueryProductsResponse> * @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 OK * 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 queryProductsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryProducts 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 OK * 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 queryProductsAsync(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query Products with filters, expands, sort capabilities. Supported expands: productrateplans,productrateplans.productrateplancharges,productrateplans.productrateplancharges.productrateplanchargetiers. * @return QueryProductsApi */ public QueryProductsApi queryProductsApi() { return new QueryProductsApi(); } private okhttp3.Call queryRatePlanByKeyCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/rate-plans/{key}" .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryRatePlanByKeyValidateBeforeCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { // verify the required parameter 'key' is set if (key == null) { throw new ApiException("Missing the required parameter 'key' when calling queryRatePlanByKey(Async)"); } return queryRatePlanByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query RatePlan by key with filters, expands, sort capabilities. Supported expands: subscription,productrateplan,rateplancharges,rateplancharges.rateplanchargetiers. * @param key Object ID or Number. (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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return ExpandedRatePlan * @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 OK * 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 ExpandedRatePlan queryRatePlanByKey(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryRatePlanByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryRatePlanByKeyWithHttpInfo(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryRatePlanByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryRatePlanByKeyAsync(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryRatePlanByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryRatePlanByKeyApi { private final String key; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryRatePlanByKeyApi(String key) { this.key = key; } /** * 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 QueryRatePlanByKeyApi */ public QueryRatePlanByKeyApi 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 QueryRatePlanByKeyApi */ public QueryRatePlanByKeyApi 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 QueryRatePlanByKeyApi */ public QueryRatePlanByKeyApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryRatePlanByKeyApi */ public QueryRatePlanByKeyApi 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 QueryRatePlanByKeyApi */ public QueryRatePlanByKeyApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryRatePlanByKeyApi */ public QueryRatePlanByKeyApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryRatePlanByKeyApi */ public QueryRatePlanByKeyApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryRatePlanByKeyApi */ public QueryRatePlanByKeyApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryRatePlanByKeyApi */ public QueryRatePlanByKeyApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryRatePlanByKeyApi */ public QueryRatePlanByKeyApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryRatePlanByKeyApi */ public QueryRatePlanByKeyApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryRatePlanByKeyApi */ public QueryRatePlanByKeyApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryRatePlanByKey * @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 OK * 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 queryRatePlanByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryRatePlanByKey request * @return ExpandedRatePlan * @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 OK * 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 ExpandedRatePlan execute() throws ApiException { ApiResponse localVarResp = queryRatePlanByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryRatePlanByKey request with HTTP info returned * @return ApiResponse<ExpandedRatePlan> * @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 OK * 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 queryRatePlanByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryRatePlanByKey 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 OK * 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 queryRatePlanByKeyAsync(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query RatePlan by key with filters, expands, sort capabilities. Supported expands: subscription,productrateplan,rateplancharges,rateplancharges.rateplanchargetiers. * @param key Object ID or Number. (required) * @return QueryRatePlanByKeyApi */ public QueryRatePlanByKeyApi queryRatePlanByKeyApi(String key) { return new QueryRatePlanByKeyApi(key); } private okhttp3.Call queryRatePlanChargeByKeyCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/rate-plan-charges/{key}" .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryRatePlanChargeByKeyValidateBeforeCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { // verify the required parameter 'key' is set if (key == null) { throw new ApiException("Missing the required parameter 'key' when calling queryRatePlanChargeByKey(Async)"); } return queryRatePlanChargeByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query RatePlanCharge by key with filters, expands, sort capabilities. Supported expands: rateplan,productrateplancharge,rateplanchargetiers. * @param key Object ID or Number. (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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return ExpandedRatePlanCharge * @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 OK * 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 ExpandedRatePlanCharge queryRatePlanChargeByKey(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryRatePlanChargeByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryRatePlanChargeByKeyWithHttpInfo(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryRatePlanChargeByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryRatePlanChargeByKeyAsync(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryRatePlanChargeByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryRatePlanChargeByKeyApi { private final String key; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryRatePlanChargeByKeyApi(String key) { this.key = key; } /** * 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 QueryRatePlanChargeByKeyApi */ public QueryRatePlanChargeByKeyApi 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 QueryRatePlanChargeByKeyApi */ public QueryRatePlanChargeByKeyApi 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 QueryRatePlanChargeByKeyApi */ public QueryRatePlanChargeByKeyApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryRatePlanChargeByKeyApi */ public QueryRatePlanChargeByKeyApi 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 QueryRatePlanChargeByKeyApi */ public QueryRatePlanChargeByKeyApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryRatePlanChargeByKeyApi */ public QueryRatePlanChargeByKeyApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryRatePlanChargeByKeyApi */ public QueryRatePlanChargeByKeyApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryRatePlanChargeByKeyApi */ public QueryRatePlanChargeByKeyApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryRatePlanChargeByKeyApi */ public QueryRatePlanChargeByKeyApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryRatePlanChargeByKeyApi */ public QueryRatePlanChargeByKeyApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryRatePlanChargeByKeyApi */ public QueryRatePlanChargeByKeyApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryRatePlanChargeByKeyApi */ public QueryRatePlanChargeByKeyApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryRatePlanChargeByKey * @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 OK * 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 queryRatePlanChargeByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryRatePlanChargeByKey request * @return ExpandedRatePlanCharge * @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 OK * 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 ExpandedRatePlanCharge execute() throws ApiException { ApiResponse localVarResp = queryRatePlanChargeByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryRatePlanChargeByKey request with HTTP info returned * @return ApiResponse<ExpandedRatePlanCharge> * @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 OK * 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 queryRatePlanChargeByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryRatePlanChargeByKey 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 OK * 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 queryRatePlanChargeByKeyAsync(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query RatePlanCharge by key with filters, expands, sort capabilities. Supported expands: rateplan,productrateplancharge,rateplanchargetiers. * @param key Object ID or Number. (required) * @return QueryRatePlanChargeByKeyApi */ public QueryRatePlanChargeByKeyApi queryRatePlanChargeByKeyApi(String key) { return new QueryRatePlanChargeByKeyApi(key); } private okhttp3.Call queryRatePlanChargeTierByKeyCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/rate-plan-charge-tiers/{key}" .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryRatePlanChargeTierByKeyValidateBeforeCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { // verify the required parameter 'key' is set if (key == null) { throw new ApiException("Missing the required parameter 'key' when calling queryRatePlanChargeTierByKey(Async)"); } return queryRatePlanChargeTierByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query RatePlanChargeTier by key with filters, expands, sort capabilities. Supported expands: rateplancharge. * @param key Object ID or Number. (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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return ExpandedRatePlanChargeTier * @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 OK * 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 ExpandedRatePlanChargeTier queryRatePlanChargeTierByKey(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryRatePlanChargeTierByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryRatePlanChargeTierByKeyWithHttpInfo(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryRatePlanChargeTierByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryRatePlanChargeTierByKeyAsync(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryRatePlanChargeTierByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryRatePlanChargeTierByKeyApi { private final String key; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryRatePlanChargeTierByKeyApi(String key) { this.key = key; } /** * 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 QueryRatePlanChargeTierByKeyApi */ public QueryRatePlanChargeTierByKeyApi 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 QueryRatePlanChargeTierByKeyApi */ public QueryRatePlanChargeTierByKeyApi 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 QueryRatePlanChargeTierByKeyApi */ public QueryRatePlanChargeTierByKeyApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryRatePlanChargeTierByKeyApi */ public QueryRatePlanChargeTierByKeyApi 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 QueryRatePlanChargeTierByKeyApi */ public QueryRatePlanChargeTierByKeyApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryRatePlanChargeTierByKeyApi */ public QueryRatePlanChargeTierByKeyApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryRatePlanChargeTierByKeyApi */ public QueryRatePlanChargeTierByKeyApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryRatePlanChargeTierByKeyApi */ public QueryRatePlanChargeTierByKeyApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryRatePlanChargeTierByKeyApi */ public QueryRatePlanChargeTierByKeyApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryRatePlanChargeTierByKeyApi */ public QueryRatePlanChargeTierByKeyApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryRatePlanChargeTierByKeyApi */ public QueryRatePlanChargeTierByKeyApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryRatePlanChargeTierByKeyApi */ public QueryRatePlanChargeTierByKeyApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryRatePlanChargeTierByKey * @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 OK * 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 queryRatePlanChargeTierByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryRatePlanChargeTierByKey request * @return ExpandedRatePlanChargeTier * @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 OK * 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 ExpandedRatePlanChargeTier execute() throws ApiException { ApiResponse localVarResp = queryRatePlanChargeTierByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryRatePlanChargeTierByKey request with HTTP info returned * @return ApiResponse<ExpandedRatePlanChargeTier> * @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 OK * 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 queryRatePlanChargeTierByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryRatePlanChargeTierByKey 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 OK * 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 queryRatePlanChargeTierByKeyAsync(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query RatePlanChargeTier by key with filters, expands, sort capabilities. Supported expands: rateplancharge. * @param key Object ID or Number. (required) * @return QueryRatePlanChargeTierByKeyApi */ public QueryRatePlanChargeTierByKeyApi queryRatePlanChargeTierByKeyApi(String key) { return new QueryRatePlanChargeTierByKeyApi(key); } private okhttp3.Call queryRatePlanChargeTiersCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/rate-plan-charge-tiers"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryRatePlanChargeTiersValidateBeforeCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { return queryRatePlanChargeTiersCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query RatePlanChargeTiers with filters, expands, sort capabilities. Supported expands: rateplancharge. * @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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return QueryRatePlanChargeTiersResponse * @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 OK * 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 QueryRatePlanChargeTiersResponse queryRatePlanChargeTiers(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryRatePlanChargeTiersWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryRatePlanChargeTiersWithHttpInfo(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryRatePlanChargeTiersValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryRatePlanChargeTiersAsync(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryRatePlanChargeTiersValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryRatePlanChargeTiersApi { private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryRatePlanChargeTiersApi() { } /** * 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 QueryRatePlanChargeTiersApi */ public QueryRatePlanChargeTiersApi 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 QueryRatePlanChargeTiersApi */ public QueryRatePlanChargeTiersApi 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 QueryRatePlanChargeTiersApi */ public QueryRatePlanChargeTiersApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryRatePlanChargeTiersApi */ public QueryRatePlanChargeTiersApi 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 QueryRatePlanChargeTiersApi */ public QueryRatePlanChargeTiersApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryRatePlanChargeTiersApi */ public QueryRatePlanChargeTiersApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryRatePlanChargeTiersApi */ public QueryRatePlanChargeTiersApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryRatePlanChargeTiersApi */ public QueryRatePlanChargeTiersApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryRatePlanChargeTiersApi */ public QueryRatePlanChargeTiersApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryRatePlanChargeTiersApi */ public QueryRatePlanChargeTiersApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryRatePlanChargeTiersApi */ public QueryRatePlanChargeTiersApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryRatePlanChargeTiersApi */ public QueryRatePlanChargeTiersApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryRatePlanChargeTiers * @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 OK * 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 queryRatePlanChargeTiersCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryRatePlanChargeTiers request * @return QueryRatePlanChargeTiersResponse * @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 OK * 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 QueryRatePlanChargeTiersResponse execute() throws ApiException { ApiResponse localVarResp = queryRatePlanChargeTiersWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryRatePlanChargeTiers request with HTTP info returned * @return ApiResponse<QueryRatePlanChargeTiersResponse> * @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 OK * 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 queryRatePlanChargeTiersWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryRatePlanChargeTiers 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 OK * 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 queryRatePlanChargeTiersAsync(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query RatePlanChargeTiers with filters, expands, sort capabilities. Supported expands: rateplancharge. * @return QueryRatePlanChargeTiersApi */ public QueryRatePlanChargeTiersApi queryRatePlanChargeTiersApi() { return new QueryRatePlanChargeTiersApi(); } private okhttp3.Call queryRatePlanChargesCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/rate-plan-charges"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryRatePlanChargesValidateBeforeCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { return queryRatePlanChargesCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query RatePlanCharges with filters, expands, sort capabilities. Supported expands: rateplan,productrateplancharge,rateplanchargetiers. * @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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return QueryRatePlanChargesResponse * @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 OK * 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 QueryRatePlanChargesResponse queryRatePlanCharges(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryRatePlanChargesWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryRatePlanChargesWithHttpInfo(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryRatePlanChargesValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryRatePlanChargesAsync(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryRatePlanChargesValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryRatePlanChargesApi { private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryRatePlanChargesApi() { } /** * 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 QueryRatePlanChargesApi */ public QueryRatePlanChargesApi 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 QueryRatePlanChargesApi */ public QueryRatePlanChargesApi 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 QueryRatePlanChargesApi */ public QueryRatePlanChargesApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryRatePlanChargesApi */ public QueryRatePlanChargesApi 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 QueryRatePlanChargesApi */ public QueryRatePlanChargesApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryRatePlanChargesApi */ public QueryRatePlanChargesApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryRatePlanChargesApi */ public QueryRatePlanChargesApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryRatePlanChargesApi */ public QueryRatePlanChargesApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryRatePlanChargesApi */ public QueryRatePlanChargesApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryRatePlanChargesApi */ public QueryRatePlanChargesApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryRatePlanChargesApi */ public QueryRatePlanChargesApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryRatePlanChargesApi */ public QueryRatePlanChargesApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryRatePlanCharges * @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 OK * 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 queryRatePlanChargesCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryRatePlanCharges request * @return QueryRatePlanChargesResponse * @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 OK * 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 QueryRatePlanChargesResponse execute() throws ApiException { ApiResponse localVarResp = queryRatePlanChargesWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryRatePlanCharges request with HTTP info returned * @return ApiResponse<QueryRatePlanChargesResponse> * @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 OK * 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 queryRatePlanChargesWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryRatePlanCharges 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 OK * 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 queryRatePlanChargesAsync(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query RatePlanCharges with filters, expands, sort capabilities. Supported expands: rateplan,productrateplancharge,rateplanchargetiers. * @return QueryRatePlanChargesApi */ public QueryRatePlanChargesApi queryRatePlanChargesApi() { return new QueryRatePlanChargesApi(); } private okhttp3.Call queryRatePlansCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/rate-plans"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryRatePlansValidateBeforeCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { return queryRatePlansCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query RatePlans with filters, expands, sort capabilities. Supported expands: subscription,productrateplan,rateplancharges,rateplancharges.rateplanchargetiers. * @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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return QueryRatePlansResponse * @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 OK * 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 QueryRatePlansResponse queryRatePlans(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryRatePlansWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryRatePlansWithHttpInfo(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryRatePlansValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryRatePlansAsync(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryRatePlansValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryRatePlansApi { private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryRatePlansApi() { } /** * 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 QueryRatePlansApi */ public QueryRatePlansApi 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 QueryRatePlansApi */ public QueryRatePlansApi 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 QueryRatePlansApi */ public QueryRatePlansApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryRatePlansApi */ public QueryRatePlansApi 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 QueryRatePlansApi */ public QueryRatePlansApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryRatePlansApi */ public QueryRatePlansApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryRatePlansApi */ public QueryRatePlansApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryRatePlansApi */ public QueryRatePlansApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryRatePlansApi */ public QueryRatePlansApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryRatePlansApi */ public QueryRatePlansApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryRatePlansApi */ public QueryRatePlansApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryRatePlansApi */ public QueryRatePlansApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryRatePlans * @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 OK * 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 queryRatePlansCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryRatePlans request * @return QueryRatePlansResponse * @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 OK * 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 QueryRatePlansResponse execute() throws ApiException { ApiResponse localVarResp = queryRatePlansWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryRatePlans request with HTTP info returned * @return ApiResponse<QueryRatePlansResponse> * @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 OK * 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 queryRatePlansWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryRatePlans 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 OK * 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 queryRatePlansAsync(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query RatePlans with filters, expands, sort capabilities. Supported expands: subscription,productrateplan,rateplancharges,rateplancharges.rateplanchargetiers. * @return QueryRatePlansApi */ public QueryRatePlansApi queryRatePlansApi() { return new QueryRatePlansApi(); } private okhttp3.Call queryRatingResultByKeyCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/rating-results/{key}" .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryRatingResultByKeyValidateBeforeCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { // verify the required parameter 'key' is set if (key == null) { throw new ApiException("Missing the required parameter 'key' when calling queryRatingResultByKey(Async)"); } return queryRatingResultByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query RatingResult by key with filters, expands, sort capabilities. Supported expands: account,rateplancharge,subscription,invoiceitem. * @param key Object ID or Number. (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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return ExpandedRatingResult * @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 OK * 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 ExpandedRatingResult queryRatingResultByKey(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryRatingResultByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryRatingResultByKeyWithHttpInfo(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryRatingResultByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryRatingResultByKeyAsync(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryRatingResultByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryRatingResultByKeyApi { private final String key; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryRatingResultByKeyApi(String key) { this.key = key; } /** * 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 QueryRatingResultByKeyApi */ public QueryRatingResultByKeyApi 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 QueryRatingResultByKeyApi */ public QueryRatingResultByKeyApi 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 QueryRatingResultByKeyApi */ public QueryRatingResultByKeyApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryRatingResultByKeyApi */ public QueryRatingResultByKeyApi 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 QueryRatingResultByKeyApi */ public QueryRatingResultByKeyApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryRatingResultByKeyApi */ public QueryRatingResultByKeyApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryRatingResultByKeyApi */ public QueryRatingResultByKeyApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryRatingResultByKeyApi */ public QueryRatingResultByKeyApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryRatingResultByKeyApi */ public QueryRatingResultByKeyApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryRatingResultByKeyApi */ public QueryRatingResultByKeyApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryRatingResultByKeyApi */ public QueryRatingResultByKeyApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryRatingResultByKeyApi */ public QueryRatingResultByKeyApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryRatingResultByKey * @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 OK * 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 queryRatingResultByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryRatingResultByKey request * @return ExpandedRatingResult * @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 OK * 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 ExpandedRatingResult execute() throws ApiException { ApiResponse localVarResp = queryRatingResultByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryRatingResultByKey request with HTTP info returned * @return ApiResponse<ExpandedRatingResult> * @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 OK * 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 queryRatingResultByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryRatingResultByKey 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 OK * 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 queryRatingResultByKeyAsync(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query RatingResult by key with filters, expands, sort capabilities. Supported expands: account,rateplancharge,subscription,invoiceitem. * @param key Object ID or Number. (required) * @return QueryRatingResultByKeyApi */ public QueryRatingResultByKeyApi queryRatingResultByKeyApi(String key) { return new QueryRatingResultByKeyApi(key); } private okhttp3.Call queryRatingResultsCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/rating-results"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryRatingResultsValidateBeforeCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { return queryRatingResultsCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query RatingResults with filters, expands, sort capabilities. Supported expands: account,rateplancharge,subscription,invoiceitem. * @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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return QueryRatingResultsResponse * @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 OK * 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 QueryRatingResultsResponse queryRatingResults(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryRatingResultsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryRatingResultsWithHttpInfo(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryRatingResultsValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryRatingResultsAsync(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryRatingResultsValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryRatingResultsApi { private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryRatingResultsApi() { } /** * 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 QueryRatingResultsApi */ public QueryRatingResultsApi 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 QueryRatingResultsApi */ public QueryRatingResultsApi 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 QueryRatingResultsApi */ public QueryRatingResultsApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryRatingResultsApi */ public QueryRatingResultsApi 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 QueryRatingResultsApi */ public QueryRatingResultsApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryRatingResultsApi */ public QueryRatingResultsApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryRatingResultsApi */ public QueryRatingResultsApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryRatingResultsApi */ public QueryRatingResultsApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryRatingResultsApi */ public QueryRatingResultsApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryRatingResultsApi */ public QueryRatingResultsApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryRatingResultsApi */ public QueryRatingResultsApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryRatingResultsApi */ public QueryRatingResultsApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryRatingResults * @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 OK * 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 queryRatingResultsCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryRatingResults request * @return QueryRatingResultsResponse * @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 OK * 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 QueryRatingResultsResponse execute() throws ApiException { ApiResponse localVarResp = queryRatingResultsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryRatingResults request with HTTP info returned * @return ApiResponse<QueryRatingResultsResponse> * @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 OK * 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 queryRatingResultsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryRatingResults 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 OK * 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 queryRatingResultsAsync(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query RatingResults with filters, expands, sort capabilities. Supported expands: account,rateplancharge,subscription,invoiceitem. * @return QueryRatingResultsApi */ public QueryRatingResultsApi queryRatingResultsApi() { return new QueryRatingResultsApi(); } private okhttp3.Call queryRefundApplicationByKeyCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/refund-applications/{key}" .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryRefundApplicationByKeyValidateBeforeCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { // verify the required parameter 'key' is set if (key == null) { throw new ApiException("Missing the required parameter 'key' when calling queryRefundApplicationByKey(Async)"); } return queryRefundApplicationByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query RefundApplication by key with filters, expands, sort capabilities. Supported expands: refund,payment,refundapplicationitems. * @param key Object ID or Number. (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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return ExpandedRefundApplication * @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 OK * 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 ExpandedRefundApplication queryRefundApplicationByKey(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryRefundApplicationByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryRefundApplicationByKeyWithHttpInfo(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryRefundApplicationByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryRefundApplicationByKeyAsync(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryRefundApplicationByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryRefundApplicationByKeyApi { private final String key; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryRefundApplicationByKeyApi(String key) { this.key = key; } /** * 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 QueryRefundApplicationByKeyApi */ public QueryRefundApplicationByKeyApi 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 QueryRefundApplicationByKeyApi */ public QueryRefundApplicationByKeyApi 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 QueryRefundApplicationByKeyApi */ public QueryRefundApplicationByKeyApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryRefundApplicationByKeyApi */ public QueryRefundApplicationByKeyApi 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 QueryRefundApplicationByKeyApi */ public QueryRefundApplicationByKeyApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryRefundApplicationByKeyApi */ public QueryRefundApplicationByKeyApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryRefundApplicationByKeyApi */ public QueryRefundApplicationByKeyApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryRefundApplicationByKeyApi */ public QueryRefundApplicationByKeyApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryRefundApplicationByKeyApi */ public QueryRefundApplicationByKeyApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryRefundApplicationByKeyApi */ public QueryRefundApplicationByKeyApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryRefundApplicationByKeyApi */ public QueryRefundApplicationByKeyApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryRefundApplicationByKeyApi */ public QueryRefundApplicationByKeyApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryRefundApplicationByKey * @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 OK * 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 queryRefundApplicationByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryRefundApplicationByKey request * @return ExpandedRefundApplication * @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 OK * 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 ExpandedRefundApplication execute() throws ApiException { ApiResponse localVarResp = queryRefundApplicationByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryRefundApplicationByKey request with HTTP info returned * @return ApiResponse<ExpandedRefundApplication> * @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 OK * 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 queryRefundApplicationByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryRefundApplicationByKey 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 OK * 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 queryRefundApplicationByKeyAsync(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query RefundApplication by key with filters, expands, sort capabilities. Supported expands: refund,payment,refundapplicationitems. * @param key Object ID or Number. (required) * @return QueryRefundApplicationByKeyApi */ public QueryRefundApplicationByKeyApi queryRefundApplicationByKeyApi(String key) { return new QueryRefundApplicationByKeyApi(key); } private okhttp3.Call queryRefundApplicationItemByKeyCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/refund-application-items/{key}" .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryRefundApplicationItemByKeyValidateBeforeCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { // verify the required parameter 'key' is set if (key == null) { throw new ApiException("Missing the required parameter 'key' when calling queryRefundApplicationItemByKey(Async)"); } return queryRefundApplicationItemByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query RefundApplicationItem by key with filters, expands, sort capabilities. Supported expands: refundapplication. * @param key Object ID or Number. (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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return ExpandedRefundApplicationItem * @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 OK * 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 ExpandedRefundApplicationItem queryRefundApplicationItemByKey(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryRefundApplicationItemByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryRefundApplicationItemByKeyWithHttpInfo(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryRefundApplicationItemByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryRefundApplicationItemByKeyAsync(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryRefundApplicationItemByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryRefundApplicationItemByKeyApi { private final String key; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryRefundApplicationItemByKeyApi(String key) { this.key = key; } /** * 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 QueryRefundApplicationItemByKeyApi */ public QueryRefundApplicationItemByKeyApi 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 QueryRefundApplicationItemByKeyApi */ public QueryRefundApplicationItemByKeyApi 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 QueryRefundApplicationItemByKeyApi */ public QueryRefundApplicationItemByKeyApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryRefundApplicationItemByKeyApi */ public QueryRefundApplicationItemByKeyApi 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 QueryRefundApplicationItemByKeyApi */ public QueryRefundApplicationItemByKeyApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryRefundApplicationItemByKeyApi */ public QueryRefundApplicationItemByKeyApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryRefundApplicationItemByKeyApi */ public QueryRefundApplicationItemByKeyApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryRefundApplicationItemByKeyApi */ public QueryRefundApplicationItemByKeyApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryRefundApplicationItemByKeyApi */ public QueryRefundApplicationItemByKeyApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryRefundApplicationItemByKeyApi */ public QueryRefundApplicationItemByKeyApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryRefundApplicationItemByKeyApi */ public QueryRefundApplicationItemByKeyApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryRefundApplicationItemByKeyApi */ public QueryRefundApplicationItemByKeyApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryRefundApplicationItemByKey * @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 OK * 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 queryRefundApplicationItemByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryRefundApplicationItemByKey request * @return ExpandedRefundApplicationItem * @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 OK * 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 ExpandedRefundApplicationItem execute() throws ApiException { ApiResponse localVarResp = queryRefundApplicationItemByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryRefundApplicationItemByKey request with HTTP info returned * @return ApiResponse<ExpandedRefundApplicationItem> * @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 OK * 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 queryRefundApplicationItemByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryRefundApplicationItemByKey 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 OK * 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 queryRefundApplicationItemByKeyAsync(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query RefundApplicationItem by key with filters, expands, sort capabilities. Supported expands: refundapplication. * @param key Object ID or Number. (required) * @return QueryRefundApplicationItemByKeyApi */ public QueryRefundApplicationItemByKeyApi queryRefundApplicationItemByKeyApi(String key) { return new QueryRefundApplicationItemByKeyApi(key); } private okhttp3.Call queryRefundApplicationItemsCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/refund-application-items"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryRefundApplicationItemsValidateBeforeCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { return queryRefundApplicationItemsCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query RefundApplicationItems with filters, expands, sort capabilities. Supported expands: refundapplication. * @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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return QueryRefundApplicationItemsResponse * @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 OK * 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 QueryRefundApplicationItemsResponse queryRefundApplicationItems(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryRefundApplicationItemsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryRefundApplicationItemsWithHttpInfo(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryRefundApplicationItemsValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryRefundApplicationItemsAsync(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryRefundApplicationItemsValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryRefundApplicationItemsApi { private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryRefundApplicationItemsApi() { } /** * 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 QueryRefundApplicationItemsApi */ public QueryRefundApplicationItemsApi 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 QueryRefundApplicationItemsApi */ public QueryRefundApplicationItemsApi 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 QueryRefundApplicationItemsApi */ public QueryRefundApplicationItemsApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryRefundApplicationItemsApi */ public QueryRefundApplicationItemsApi 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 QueryRefundApplicationItemsApi */ public QueryRefundApplicationItemsApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryRefundApplicationItemsApi */ public QueryRefundApplicationItemsApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryRefundApplicationItemsApi */ public QueryRefundApplicationItemsApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryRefundApplicationItemsApi */ public QueryRefundApplicationItemsApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryRefundApplicationItemsApi */ public QueryRefundApplicationItemsApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryRefundApplicationItemsApi */ public QueryRefundApplicationItemsApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryRefundApplicationItemsApi */ public QueryRefundApplicationItemsApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryRefundApplicationItemsApi */ public QueryRefundApplicationItemsApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryRefundApplicationItems * @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 OK * 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 queryRefundApplicationItemsCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryRefundApplicationItems request * @return QueryRefundApplicationItemsResponse * @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 OK * 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 QueryRefundApplicationItemsResponse execute() throws ApiException { ApiResponse localVarResp = queryRefundApplicationItemsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryRefundApplicationItems request with HTTP info returned * @return ApiResponse<QueryRefundApplicationItemsResponse> * @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 OK * 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 queryRefundApplicationItemsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryRefundApplicationItems 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 OK * 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 queryRefundApplicationItemsAsync(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query RefundApplicationItems with filters, expands, sort capabilities. Supported expands: refundapplication. * @return QueryRefundApplicationItemsApi */ public QueryRefundApplicationItemsApi queryRefundApplicationItemsApi() { return new QueryRefundApplicationItemsApi(); } private okhttp3.Call queryRefundApplicationsCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/refund-applications"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryRefundApplicationsValidateBeforeCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { return queryRefundApplicationsCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query RefundApplications with filters, expands, sort capabilities. Supported expands: refund,payment,refundapplicationitems. * @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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return QueryRefundApplicationsResponse * @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 OK * 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 QueryRefundApplicationsResponse queryRefundApplications(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryRefundApplicationsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryRefundApplicationsWithHttpInfo(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryRefundApplicationsValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryRefundApplicationsAsync(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryRefundApplicationsValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryRefundApplicationsApi { private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryRefundApplicationsApi() { } /** * 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 QueryRefundApplicationsApi */ public QueryRefundApplicationsApi 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 QueryRefundApplicationsApi */ public QueryRefundApplicationsApi 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 QueryRefundApplicationsApi */ public QueryRefundApplicationsApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryRefundApplicationsApi */ public QueryRefundApplicationsApi 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 QueryRefundApplicationsApi */ public QueryRefundApplicationsApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryRefundApplicationsApi */ public QueryRefundApplicationsApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryRefundApplicationsApi */ public QueryRefundApplicationsApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryRefundApplicationsApi */ public QueryRefundApplicationsApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryRefundApplicationsApi */ public QueryRefundApplicationsApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryRefundApplicationsApi */ public QueryRefundApplicationsApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryRefundApplicationsApi */ public QueryRefundApplicationsApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryRefundApplicationsApi */ public QueryRefundApplicationsApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryRefundApplications * @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 OK * 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 queryRefundApplicationsCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryRefundApplications request * @return QueryRefundApplicationsResponse * @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 OK * 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 QueryRefundApplicationsResponse execute() throws ApiException { ApiResponse localVarResp = queryRefundApplicationsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryRefundApplications request with HTTP info returned * @return ApiResponse<QueryRefundApplicationsResponse> * @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 OK * 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 queryRefundApplicationsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryRefundApplications 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 OK * 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 queryRefundApplicationsAsync(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query RefundApplications with filters, expands, sort capabilities. Supported expands: refund,payment,refundapplicationitems. * @return QueryRefundApplicationsApi */ public QueryRefundApplicationsApi queryRefundApplicationsApi() { return new QueryRefundApplicationsApi(); } private okhttp3.Call queryRefundByKeyCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/refunds/{key}" .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryRefundByKeyValidateBeforeCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { // verify the required parameter 'key' is set if (key == null) { throw new ApiException("Missing the required parameter 'key' when calling queryRefundByKey(Async)"); } return queryRefundByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query Refund by key with filters, expands, sort capabilities. Supported expands: account,account.billto,account.soldto,paymentmethod,refundapplications,refundapplications.payment,refundapplications.refundapplicationitems. * @param key Object ID or Number. (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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return ExpandedRefund * @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 OK * 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 ExpandedRefund queryRefundByKey(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryRefundByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryRefundByKeyWithHttpInfo(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryRefundByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryRefundByKeyAsync(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryRefundByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryRefundByKeyApi { private final String key; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryRefundByKeyApi(String key) { this.key = key; } /** * 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 QueryRefundByKeyApi */ public QueryRefundByKeyApi 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 QueryRefundByKeyApi */ public QueryRefundByKeyApi 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 QueryRefundByKeyApi */ public QueryRefundByKeyApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryRefundByKeyApi */ public QueryRefundByKeyApi 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 QueryRefundByKeyApi */ public QueryRefundByKeyApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryRefundByKeyApi */ public QueryRefundByKeyApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryRefundByKeyApi */ public QueryRefundByKeyApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryRefundByKeyApi */ public QueryRefundByKeyApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryRefundByKeyApi */ public QueryRefundByKeyApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryRefundByKeyApi */ public QueryRefundByKeyApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryRefundByKeyApi */ public QueryRefundByKeyApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryRefundByKeyApi */ public QueryRefundByKeyApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryRefundByKey * @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 OK * 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 queryRefundByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryRefundByKey request * @return ExpandedRefund * @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 OK * 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 ExpandedRefund execute() throws ApiException { ApiResponse localVarResp = queryRefundByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryRefundByKey request with HTTP info returned * @return ApiResponse<ExpandedRefund> * @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 OK * 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 queryRefundByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryRefundByKey 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 OK * 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 queryRefundByKeyAsync(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query Refund by key with filters, expands, sort capabilities. Supported expands: account,account.billto,account.soldto,paymentmethod,refundapplications,refundapplications.payment,refundapplications.refundapplicationitems. * @param key Object ID or Number. (required) * @return QueryRefundByKeyApi */ public QueryRefundByKeyApi queryRefundByKeyApi(String key) { return new QueryRefundByKeyApi(key); } private okhttp3.Call queryRefundsCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/refunds"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryRefundsValidateBeforeCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { return queryRefundsCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query Refunds with filters, expands, sort capabilities. Supported expands: account,account.billto,account.soldto,paymentmethod,refundapplications,refundapplications.payment,refundapplications.refundapplicationitems. * @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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return QueryRefundsResponse * @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 OK * 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 QueryRefundsResponse queryRefunds(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryRefundsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryRefundsWithHttpInfo(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryRefundsValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryRefundsAsync(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryRefundsValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryRefundsApi { private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryRefundsApi() { } /** * 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 QueryRefundsApi */ public QueryRefundsApi 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 QueryRefundsApi */ public QueryRefundsApi 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 QueryRefundsApi */ public QueryRefundsApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryRefundsApi */ public QueryRefundsApi 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 QueryRefundsApi */ public QueryRefundsApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryRefundsApi */ public QueryRefundsApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryRefundsApi */ public QueryRefundsApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryRefundsApi */ public QueryRefundsApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryRefundsApi */ public QueryRefundsApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryRefundsApi */ public QueryRefundsApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryRefundsApi */ public QueryRefundsApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryRefundsApi */ public QueryRefundsApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryRefunds * @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 OK * 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 queryRefundsCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryRefunds request * @return QueryRefundsResponse * @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 OK * 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 QueryRefundsResponse execute() throws ApiException { ApiResponse localVarResp = queryRefundsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryRefunds request with HTTP info returned * @return ApiResponse<QueryRefundsResponse> * @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 OK * 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 queryRefundsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryRefunds 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 OK * 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 queryRefundsAsync(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query Refunds with filters, expands, sort capabilities. Supported expands: account,account.billto,account.soldto,paymentmethod,refundapplications,refundapplications.payment,refundapplications.refundapplicationitems. * @return QueryRefundsApi */ public QueryRefundsApi queryRefundsApi() { return new QueryRefundsApi(); } private okhttp3.Call querySubscriptionByKeyCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/subscriptions/{key}" .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 querySubscriptionByKeyValidateBeforeCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { // verify the required parameter 'key' is set if (key == null) { throw new ApiException("Missing the required parameter 'key' when calling querySubscriptionByKey(Async)"); } return querySubscriptionByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query Subscription by key with filters, expands, sort capabilities. Supported expands: account,invoiceowner,billtocontact,invoiceitems,rateplans,rateplans.rateplancharges,rateplans.rateplancharges.rateplanchargetiers,account.billto,account.soldto,account.paymentmethods,order. * @param key Object ID or Number. (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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return ExpandedSubscription * @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 OK * 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 ExpandedSubscription querySubscriptionByKey(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = querySubscriptionByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse querySubscriptionByKeyWithHttpInfo(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = querySubscriptionByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call querySubscriptionByKeyAsync(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = querySubscriptionByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QuerySubscriptionByKeyApi { private final String key; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QuerySubscriptionByKeyApi(String key) { this.key = key; } /** * 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 QuerySubscriptionByKeyApi */ public QuerySubscriptionByKeyApi 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 QuerySubscriptionByKeyApi */ public QuerySubscriptionByKeyApi 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 QuerySubscriptionByKeyApi */ public QuerySubscriptionByKeyApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QuerySubscriptionByKeyApi */ public QuerySubscriptionByKeyApi 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 QuerySubscriptionByKeyApi */ public QuerySubscriptionByKeyApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QuerySubscriptionByKeyApi */ public QuerySubscriptionByKeyApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QuerySubscriptionByKeyApi */ public QuerySubscriptionByKeyApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QuerySubscriptionByKeyApi */ public QuerySubscriptionByKeyApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QuerySubscriptionByKeyApi */ public QuerySubscriptionByKeyApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QuerySubscriptionByKeyApi */ public QuerySubscriptionByKeyApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QuerySubscriptionByKeyApi */ public QuerySubscriptionByKeyApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QuerySubscriptionByKeyApi */ public QuerySubscriptionByKeyApi filter(List filter) { this.filter = filter; return this; } /** * Build call for querySubscriptionByKey * @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 OK * 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 querySubscriptionByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute querySubscriptionByKey request * @return ExpandedSubscription * @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 OK * 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 ExpandedSubscription execute() throws ApiException { ApiResponse localVarResp = querySubscriptionByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute querySubscriptionByKey request with HTTP info returned * @return ApiResponse<ExpandedSubscription> * @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 OK * 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 querySubscriptionByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute querySubscriptionByKey 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 OK * 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 querySubscriptionByKeyAsync(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query Subscription by key with filters, expands, sort capabilities. Supported expands: account,invoiceowner,billtocontact,invoiceitems,rateplans,rateplans.rateplancharges,rateplans.rateplancharges.rateplanchargetiers,account.billto,account.soldto,account.paymentmethods,order. * @param key Object ID or Number. (required) * @return QuerySubscriptionByKeyApi */ public QuerySubscriptionByKeyApi querySubscriptionByKeyApi(String key) { return new QuerySubscriptionByKeyApi(key); } private okhttp3.Call querySubscriptionsCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/subscriptions"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 querySubscriptionsValidateBeforeCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { return querySubscriptionsCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query Subscriptions with filters, expands, sort capabilities. Supported expands: account,invoiceowner,billtocontact,invoiceitems,rateplans,rateplans.rateplancharges,rateplans.rateplancharges.rateplanchargetiers,account.billto,account.soldto,account.paymentmethods,order. * @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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return QuerySubscriptionsResponse * @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 OK * 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 QuerySubscriptionsResponse querySubscriptions(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = querySubscriptionsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse querySubscriptionsWithHttpInfo(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = querySubscriptionsValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call querySubscriptionsAsync(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = querySubscriptionsValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QuerySubscriptionsApi { private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QuerySubscriptionsApi() { } /** * 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 QuerySubscriptionsApi */ public QuerySubscriptionsApi 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 QuerySubscriptionsApi */ public QuerySubscriptionsApi 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 QuerySubscriptionsApi */ public QuerySubscriptionsApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QuerySubscriptionsApi */ public QuerySubscriptionsApi 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 QuerySubscriptionsApi */ public QuerySubscriptionsApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QuerySubscriptionsApi */ public QuerySubscriptionsApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QuerySubscriptionsApi */ public QuerySubscriptionsApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QuerySubscriptionsApi */ public QuerySubscriptionsApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QuerySubscriptionsApi */ public QuerySubscriptionsApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QuerySubscriptionsApi */ public QuerySubscriptionsApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QuerySubscriptionsApi */ public QuerySubscriptionsApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QuerySubscriptionsApi */ public QuerySubscriptionsApi filter(List filter) { this.filter = filter; return this; } /** * Build call for querySubscriptions * @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 OK * 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 querySubscriptionsCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute querySubscriptions request * @return QuerySubscriptionsResponse * @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 OK * 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 QuerySubscriptionsResponse execute() throws ApiException { ApiResponse localVarResp = querySubscriptionsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute querySubscriptions request with HTTP info returned * @return ApiResponse<QuerySubscriptionsResponse> * @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 OK * 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 querySubscriptionsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute querySubscriptions 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 OK * 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 querySubscriptionsAsync(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query Subscriptions with filters, expands, sort capabilities. Supported expands: account,invoiceowner,billtocontact,invoiceitems,rateplans,rateplans.rateplancharges,rateplans.rateplancharges.rateplanchargetiers,account.billto,account.soldto,account.paymentmethods,order. * @return QuerySubscriptionsApi */ public QuerySubscriptionsApi querySubscriptionsApi() { return new QuerySubscriptionsApi(); } private okhttp3.Call queryTaxationItemByKeyCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/taxation-items/{key}" .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryTaxationItemByKeyValidateBeforeCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { // verify the required parameter 'key' is set if (key == null) { throw new ApiException("Missing the required parameter 'key' when calling queryTaxationItemByKey(Async)"); } return queryTaxationItemByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query TaxationItem by key with filters, expands, sort capabilities. Supported expands: N/A. * @param key Object ID or Number. (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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return ExpandedTaxationItem * @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 OK * 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 ExpandedTaxationItem queryTaxationItemByKey(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryTaxationItemByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryTaxationItemByKeyWithHttpInfo(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryTaxationItemByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryTaxationItemByKeyAsync(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryTaxationItemByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryTaxationItemByKeyApi { private final String key; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryTaxationItemByKeyApi(String key) { this.key = key; } /** * 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 QueryTaxationItemByKeyApi */ public QueryTaxationItemByKeyApi 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 QueryTaxationItemByKeyApi */ public QueryTaxationItemByKeyApi 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 QueryTaxationItemByKeyApi */ public QueryTaxationItemByKeyApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryTaxationItemByKeyApi */ public QueryTaxationItemByKeyApi 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 QueryTaxationItemByKeyApi */ public QueryTaxationItemByKeyApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryTaxationItemByKeyApi */ public QueryTaxationItemByKeyApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryTaxationItemByKeyApi */ public QueryTaxationItemByKeyApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryTaxationItemByKeyApi */ public QueryTaxationItemByKeyApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryTaxationItemByKeyApi */ public QueryTaxationItemByKeyApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryTaxationItemByKeyApi */ public QueryTaxationItemByKeyApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryTaxationItemByKeyApi */ public QueryTaxationItemByKeyApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryTaxationItemByKeyApi */ public QueryTaxationItemByKeyApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryTaxationItemByKey * @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 OK * 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 queryTaxationItemByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryTaxationItemByKey request * @return ExpandedTaxationItem * @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 OK * 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 ExpandedTaxationItem execute() throws ApiException { ApiResponse localVarResp = queryTaxationItemByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryTaxationItemByKey request with HTTP info returned * @return ApiResponse<ExpandedTaxationItem> * @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 OK * 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 queryTaxationItemByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryTaxationItemByKey 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 OK * 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 queryTaxationItemByKeyAsync(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query TaxationItem by key with filters, expands, sort capabilities. Supported expands: N/A. * @param key Object ID or Number. (required) * @return QueryTaxationItemByKeyApi */ public QueryTaxationItemByKeyApi queryTaxationItemByKeyApi(String key) { return new QueryTaxationItemByKeyApi(key); } private okhttp3.Call queryTaxationItemsCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/taxation-items"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryTaxationItemsValidateBeforeCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { return queryTaxationItemsCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query TaxationItems with filters, expands, sort capabilities. Supported expands: N/A. * @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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return QueryTaxationItemsResponse * @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 OK * 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 QueryTaxationItemsResponse queryTaxationItems(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryTaxationItemsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryTaxationItemsWithHttpInfo(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryTaxationItemsValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryTaxationItemsAsync(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryTaxationItemsValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryTaxationItemsApi { private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryTaxationItemsApi() { } /** * 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 QueryTaxationItemsApi */ public QueryTaxationItemsApi 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 QueryTaxationItemsApi */ public QueryTaxationItemsApi 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 QueryTaxationItemsApi */ public QueryTaxationItemsApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryTaxationItemsApi */ public QueryTaxationItemsApi 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 QueryTaxationItemsApi */ public QueryTaxationItemsApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryTaxationItemsApi */ public QueryTaxationItemsApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryTaxationItemsApi */ public QueryTaxationItemsApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryTaxationItemsApi */ public QueryTaxationItemsApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryTaxationItemsApi */ public QueryTaxationItemsApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryTaxationItemsApi */ public QueryTaxationItemsApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryTaxationItemsApi */ public QueryTaxationItemsApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryTaxationItemsApi */ public QueryTaxationItemsApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryTaxationItems * @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 OK * 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 queryTaxationItemsCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryTaxationItems request * @return QueryTaxationItemsResponse * @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 OK * 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 QueryTaxationItemsResponse execute() throws ApiException { ApiResponse localVarResp = queryTaxationItemsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryTaxationItems request with HTTP info returned * @return ApiResponse<QueryTaxationItemsResponse> * @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 OK * 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 queryTaxationItemsWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryTaxationItems 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 OK * 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 queryTaxationItemsAsync(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query TaxationItems with filters, expands, sort capabilities. Supported expands: N/A. * @return QueryTaxationItemsApi */ public QueryTaxationItemsApi queryTaxationItemsApi() { return new QueryTaxationItemsApi(); } private okhttp3.Call queryUsageByKeyCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/usages/{key}" .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryUsageByKeyValidateBeforeCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { // verify the required parameter 'key' is set if (key == null) { throw new ApiException("Missing the required parameter 'key' when calling queryUsageByKey(Async)"); } return queryUsageByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query Usage by key with filters, expands, sort capabilities. Supported expands: account. * @param key Object ID or Number. (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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return ExpandedUsage * @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 OK * 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 ExpandedUsage queryUsageByKey(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryUsageByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryUsageByKeyWithHttpInfo(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryUsageByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryUsageByKeyAsync(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryUsageByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryUsageByKeyApi { private final String key; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryUsageByKeyApi(String key) { this.key = key; } /** * 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 QueryUsageByKeyApi */ public QueryUsageByKeyApi 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 QueryUsageByKeyApi */ public QueryUsageByKeyApi 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 QueryUsageByKeyApi */ public QueryUsageByKeyApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryUsageByKeyApi */ public QueryUsageByKeyApi 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 QueryUsageByKeyApi */ public QueryUsageByKeyApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryUsageByKeyApi */ public QueryUsageByKeyApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryUsageByKeyApi */ public QueryUsageByKeyApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryUsageByKeyApi */ public QueryUsageByKeyApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryUsageByKeyApi */ public QueryUsageByKeyApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryUsageByKeyApi */ public QueryUsageByKeyApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryUsageByKeyApi */ public QueryUsageByKeyApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryUsageByKeyApi */ public QueryUsageByKeyApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryUsageByKey * @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 OK * 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 queryUsageByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryUsageByKey request * @return ExpandedUsage * @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 OK * 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 ExpandedUsage execute() throws ApiException { ApiResponse localVarResp = queryUsageByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryUsageByKey request with HTTP info returned * @return ApiResponse<ExpandedUsage> * @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 OK * 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 queryUsageByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryUsageByKey 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 OK * 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 queryUsageByKeyAsync(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query Usage by key with filters, expands, sort capabilities. Supported expands: account. * @param key Object ID or Number. (required) * @return QueryUsageByKeyApi */ public QueryUsageByKeyApi queryUsageByKeyApi(String key) { return new QueryUsageByKeyApi(key); } private okhttp3.Call queryUsagesCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/usages"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryUsagesValidateBeforeCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { return queryUsagesCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query Usages with filters, expands, sort capabilities. Supported expands: account. * @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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return QueryUsagesResponse * @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 OK * 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 QueryUsagesResponse queryUsages(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryUsagesWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryUsagesWithHttpInfo(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryUsagesValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryUsagesAsync(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryUsagesValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryUsagesApi { private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryUsagesApi() { } /** * 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 QueryUsagesApi */ public QueryUsagesApi 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 QueryUsagesApi */ public QueryUsagesApi 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 QueryUsagesApi */ public QueryUsagesApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryUsagesApi */ public QueryUsagesApi 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 QueryUsagesApi */ public QueryUsagesApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryUsagesApi */ public QueryUsagesApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryUsagesApi */ public QueryUsagesApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryUsagesApi */ public QueryUsagesApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryUsagesApi */ public QueryUsagesApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryUsagesApi */ public QueryUsagesApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryUsagesApi */ public QueryUsagesApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryUsagesApi */ public QueryUsagesApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryUsages * @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 OK * 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 queryUsagesCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryUsages request * @return QueryUsagesResponse * @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 OK * 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 QueryUsagesResponse execute() throws ApiException { ApiResponse localVarResp = queryUsagesWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryUsages request with HTTP info returned * @return ApiResponse<QueryUsagesResponse> * @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 OK * 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 queryUsagesWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryUsages 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 OK * 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 queryUsagesAsync(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query Usages with filters, expands, sort capabilities. Supported expands: account. * @return QueryUsagesApi */ public QueryUsagesApi queryUsagesApi() { return new QueryUsagesApi(); } private okhttp3.Call queryValidityPeriodSummaryByKeyCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/validity-period-summaries/{key}" .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryValidityPeriodSummaryByKeyValidateBeforeCall(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { // verify the required parameter 'key' is set if (key == null) { throw new ApiException("Missing the required parameter 'key' when calling queryValidityPeriodSummaryByKey(Async)"); } return queryValidityPeriodSummaryByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query ValidityPeriodSummary by key with filters, expands, sort capabilities. Supported expands: account,prepaidbalance. * @param key Object ID or Number. (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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return ExpandedValidityPeriodSummary * @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 OK * 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 ExpandedValidityPeriodSummary queryValidityPeriodSummaryByKey(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryValidityPeriodSummaryByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryValidityPeriodSummaryByKeyWithHttpInfo(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryValidityPeriodSummaryByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryValidityPeriodSummaryByKeyAsync(String key, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryValidityPeriodSummaryByKeyValidateBeforeCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryValidityPeriodSummaryByKeyApi { private final String key; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryValidityPeriodSummaryByKeyApi(String key) { this.key = key; } /** * 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 QueryValidityPeriodSummaryByKeyApi */ public QueryValidityPeriodSummaryByKeyApi 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 QueryValidityPeriodSummaryByKeyApi */ public QueryValidityPeriodSummaryByKeyApi 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 QueryValidityPeriodSummaryByKeyApi */ public QueryValidityPeriodSummaryByKeyApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryValidityPeriodSummaryByKeyApi */ public QueryValidityPeriodSummaryByKeyApi 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 QueryValidityPeriodSummaryByKeyApi */ public QueryValidityPeriodSummaryByKeyApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryValidityPeriodSummaryByKeyApi */ public QueryValidityPeriodSummaryByKeyApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryValidityPeriodSummaryByKeyApi */ public QueryValidityPeriodSummaryByKeyApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `pageSize` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryValidityPeriodSummaryByKeyApi */ public QueryValidityPeriodSummaryByKeyApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryValidityPeriodSummaryByKeyApi */ public QueryValidityPeriodSummaryByKeyApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryValidityPeriodSummaryByKeyApi */ public QueryValidityPeriodSummaryByKeyApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryValidityPeriodSummaryByKeyApi */ public QueryValidityPeriodSummaryByKeyApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryValidityPeriodSummaryByKeyApi */ public QueryValidityPeriodSummaryByKeyApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryValidityPeriodSummaryByKey * @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 OK * 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 queryValidityPeriodSummaryByKeyCall(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryValidityPeriodSummaryByKey request * @return ExpandedValidityPeriodSummary * @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 OK * 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 ExpandedValidityPeriodSummary execute() throws ApiException { ApiResponse localVarResp = queryValidityPeriodSummaryByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryValidityPeriodSummaryByKey request with HTTP info returned * @return ApiResponse<ExpandedValidityPeriodSummary> * @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 OK * 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 queryValidityPeriodSummaryByKeyWithHttpInfo(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryValidityPeriodSummaryByKey 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 OK * 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 queryValidityPeriodSummaryByKeyAsync(key, idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query ValidityPeriodSummary by key with filters, expands, sort capabilities. Supported expands: account,prepaidbalance. * @param key Object ID or Number. (required) * @return QueryValidityPeriodSummaryByKeyApi */ public QueryValidityPeriodSummaryByKeyApi queryValidityPeriodSummaryByKeyApi(String key) { return new QueryValidityPeriodSummaryByKeyApi(key); } private okhttp3.Call queryValidityPeriodSummarysCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, 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 = "/object-query/validity-period-summaries"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } 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 (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } 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 queryValidityPeriodSummarysValidateBeforeCall(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { return queryValidityPeriodSummarysCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * * Query ValidityPeriodSummarys with filters, expands, sort capabilities. Supported expands: account,prepaidbalance. * @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 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 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 zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @param filter A case-sensitive filter on the list. (optional) * @return QueryValidityPeriodSummarysResponse * @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 OK * 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 QueryValidityPeriodSummarysResponse queryValidityPeriodSummarys(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { ApiResponse localVarResp = queryValidityPeriodSummarysWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } private ApiResponse queryValidityPeriodSummarysWithHttpInfo(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter) throws ApiException { okhttp3.Call localVarCall = queryValidityPeriodSummarysValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call queryValidityPeriodSummarysAsync(String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraTrackId, String zuoraEntityIds, String authorization, String zuoraVersion, Integer pageSize, String cursor, List sort, List expand, List filter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryValidityPeriodSummarysValidateBeforeCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class QueryValidityPeriodSummarysApi { private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraTrackId; private String zuoraEntityIds; private String authorization; private String zuoraVersion; private Integer pageSize; private String cursor; private List sort; private List expand; private List filter; private QueryValidityPeriodSummarysApi() { } /** * 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 QueryValidityPeriodSummarysApi */ public QueryValidityPeriodSummarysApi 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 QueryValidityPeriodSummarysApi */ public QueryValidityPeriodSummarysApi 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 QueryValidityPeriodSummarysApi */ public QueryValidityPeriodSummarysApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; 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 QueryValidityPeriodSummarysApi */ public QueryValidityPeriodSummarysApi 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 QueryValidityPeriodSummarysApi */ public QueryValidityPeriodSummarysApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; 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 QueryValidityPeriodSummarysApi */ public QueryValidityPeriodSummarysApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return QueryValidityPeriodSummarysApi */ public QueryValidityPeriodSummarysApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 50, Zuora will return a 400 error. (optional) * @return QueryValidityPeriodSummarysApi */ public QueryValidityPeriodSummarysApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return QueryValidityPeriodSummarysApi */ public QueryValidityPeriodSummarysApi cursor(String cursor) { this.cursor = cursor; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `accountnumber.ASC`) or descending (e.g. `accountnumber.DESC`). You cannot sort on properties in arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return QueryValidityPeriodSummarysApi */ public QueryValidityPeriodSummarysApi sort(List sort) { this.sort = sort; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. (optional) * @return QueryValidityPeriodSummarysApi */ public QueryValidityPeriodSummarysApi expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. (optional) * @return QueryValidityPeriodSummarysApi */ public QueryValidityPeriodSummarysApi filter(List filter) { this.filter = filter; return this; } /** * Build call for queryValidityPeriodSummarys * @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 OK * 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 queryValidityPeriodSummarysCall(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } /** * Execute queryValidityPeriodSummarys request * @return QueryValidityPeriodSummarysResponse * @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 OK * 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 QueryValidityPeriodSummarysResponse execute() throws ApiException { ApiResponse localVarResp = queryValidityPeriodSummarysWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); return localVarResp.getData(); } /** * Execute queryValidityPeriodSummarys request with HTTP info returned * @return ApiResponse<QueryValidityPeriodSummarysResponse> * @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 OK * 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 queryValidityPeriodSummarysWithHttpInfo(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter); } /** * Execute queryValidityPeriodSummarys 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 OK * 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 queryValidityPeriodSummarysAsync(idempotencyKey, acceptEncoding, contentEncoding, zuoraTrackId, zuoraEntityIds, authorization, zuoraVersion, pageSize, cursor, sort, expand, filter, _callback); } } /** * * Query ValidityPeriodSummarys with filters, expands, sort capabilities. Supported expands: account,prepaidbalance. * @return QueryValidityPeriodSummarysApi */ public QueryValidityPeriodSummarysApi queryValidityPeriodSummarysApi() { return new QueryValidityPeriodSummarysApi(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy