Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* 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.DeleteResult;
import com.zuora.model.FailedReason;
import com.zuora.model.FaultResponse;
import com.zuora.model.ProxyActioncreateRequest;
import com.zuora.model.ProxyActiondeleteRequest;
import com.zuora.model.ProxyActionqueryMoreRequest;
import com.zuora.model.ProxyActionqueryMoreResponse;
import com.zuora.model.ProxyActionqueryRequest;
import com.zuora.model.ProxyActionqueryResponse;
import com.zuora.model.ProxyActionupdateRequest;
import com.zuora.model.ProxyUnauthorizedResponse;
import com.zuora.model.SaveResult;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class ActionsApi {
private ApiClient localVarApiClient;
private int localHostIndex;
private String localCustomBaseUrl;
public ActionsApi() {
this(Configuration.getDefaultApiClient());
}
public ActionsApi(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 actionPostCreateCall(ProxyActioncreateRequest createRequest, String idempotencyKey, String acceptEncoding, String contentEncoding, String authorization, Boolean rejectUnknownFields, String zuoraEntityIds, String zuoraTrackId, String xZuoraWSDLVersion, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = createRequest;
// create path and map variables
String localVarPath = "/v1/action/create";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (rejectUnknownFields != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("rejectUnknownFields", rejectUnknownFields));
}
if (idempotencyKey != null) {
localVarHeaderParams.put("Idempotency-Key", localVarApiClient.parameterToString(idempotencyKey));
}
if (acceptEncoding != null) {
localVarHeaderParams.put("Accept-Encoding", localVarApiClient.parameterToString(acceptEncoding));
}
if (contentEncoding != null) {
localVarHeaderParams.put("Content-Encoding", localVarApiClient.parameterToString(contentEncoding));
}
if (authorization != null) {
localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization));
}
if (zuoraEntityIds != null) {
localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds));
}
if (zuoraTrackId != null) {
localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId));
}
if (xZuoraWSDLVersion != null) {
localVarHeaderParams.put("X-Zuora-WSDL-Version", localVarApiClient.parameterToString(xZuoraWSDLVersion));
}
if (zuoraVersion != null) {
localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion));
}
if (zuoraOrgIds != null) {
localVarHeaderParams.put("Zuora-Org-Ids", localVarApiClient.parameterToString(zuoraOrgIds));
}
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "bearerAuth" };
return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call actionPostCreateValidateBeforeCall(ProxyActioncreateRequest createRequest, String idempotencyKey, String acceptEncoding, String contentEncoding, String authorization, Boolean rejectUnknownFields, String zuoraEntityIds, String zuoraTrackId, String xZuoraWSDLVersion, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'createRequest' is set
if (createRequest == null) {
throw new ApiException("Missing the required parameter 'createRequest' when calling actionPostCreate(Async)");
}
return actionPostCreateCall(createRequest, idempotencyKey, acceptEncoding, contentEncoding, authorization, rejectUnknownFields, zuoraEntityIds, zuoraTrackId, xZuoraWSDLVersion, zuoraVersion, zuoraOrgIds, _callback);
}
/**
* Create
* Use the create call to create one or more objects of a specific type. You can specify different types in different create calls, but each create call must apply to only one type of object. ### Limitations This call has the following limitations: * A maximum of 50 objects are supported in a single call. * The Orders feature is not supported. * The Invoice Settlement feature is not supported. This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. * The default WSDL version for Actions is 79. To create objects according to a different WSDL version, set the `X-Zuora-WSDL-Version` header. To find out in which WSDL version a particular object or field was introduced, see [Zuora SOAP API Version History](https://knowledgecenter.zuora.com/DC_Developers/G_SOAP_API/Zuora_SOAP_API_Version_History). ### How to use this call You can create on an array of one or more zObjects. The fields you should specify can be found in the corresponding \"CRUD: Create an *zObject*\" operation. For example, to create one or multiple accounts, use the request fields in the [CRUD: Create an account](https://www.zuora.com/developer/api-references/older-api/operation/Object_PostAccount/) operation. It returns an array of SaveResults sorted in the same order, indicating the success or failure of creating each object. The following information applies to this call: * You cannot pass in null zObjects. * You can pass in a maximum of 50 zObjects at a time. * All objects must be of the same type. #### Using Create and Subscribe Calls Both the Create and Subscribe calls will create a new account. However, there are differences between the calls. Use the create call to create an account independent of a subscription. Use the subscribe call to create the account with the subscription and the initial payment information.
* @param createRequest (required)
* @param idempotencyKey Specify a unique idempotency key if you want to perform an idempotent POST or PATCH request. Do not use this header in other request types. With this header specified, the Zuora server can identify subsequent retries of the same request using this value, which prevents the same operation from being performed multiple times by accident. (optional)
* @param acceptEncoding Include the `Accept-Encoding: gzip` header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a `Content-Encoding` header with the compression algorithm so that your client can decompress it. (optional)
* @param contentEncoding Include the `Content-Encoding: gzip` header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload. (optional)
* @param authorization The value is in the `Bearer {token}` format where {token} is a valid OAuth token generated by calling [Create an OAuth token](https://www.zuora.com/developer/api-references/api/operation/createToken). (optional)
* @param rejectUnknownFields Specifies whether the call fails if the request body contains unknown fields. With `rejectUnknownFields` set to `true`, Zuora returns a 400 response if the request body contains unknown fields. The body of the 400 response is: ```json { \"message\": \"Error - unrecognised fields\" } ``` By default, Zuora ignores unknown fields in the request body. (optional, default to false)
* @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 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 xZuoraWSDLVersion Zuora WSDL version number. (optional, default to 79)
* @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20)
* @param zuoraOrgIds Comma separated IDs. If you have Zuora Multi-Org enabled, you can use this header to specify which orgs to perform the operation in. If you do not have Zuora Multi-Org enabled, you should not set this header. The IDs must be a sub-set of the user's accessible orgs. If you specify an org that the user does not have access to, the operation fails. If the header is not set, the operation is performed in scope of the user's accessible orgs. (optional)
* @return List<SaveResult>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
*/
protected List actionPostCreate(ProxyActioncreateRequest createRequest, String idempotencyKey, String acceptEncoding, String contentEncoding, String authorization, Boolean rejectUnknownFields, String zuoraEntityIds, String zuoraTrackId, String xZuoraWSDLVersion, String zuoraVersion, String zuoraOrgIds) throws ApiException {
ApiResponse> localVarResp = actionPostCreateWithHttpInfo(createRequest, idempotencyKey, acceptEncoding, contentEncoding, authorization, rejectUnknownFields, zuoraEntityIds, zuoraTrackId, xZuoraWSDLVersion, zuoraVersion, zuoraOrgIds);
return localVarResp.getData();
}
private ApiResponse> actionPostCreateWithHttpInfo(ProxyActioncreateRequest createRequest, String idempotencyKey, String acceptEncoding, String contentEncoding, String authorization, Boolean rejectUnknownFields, String zuoraEntityIds, String zuoraTrackId, String xZuoraWSDLVersion, String zuoraVersion, String zuoraOrgIds) throws ApiException {
okhttp3.Call localVarCall = actionPostCreateValidateBeforeCall(createRequest, idempotencyKey, acceptEncoding, contentEncoding, authorization, rejectUnknownFields, zuoraEntityIds, zuoraTrackId, xZuoraWSDLVersion, zuoraVersion, zuoraOrgIds, null);
Type localVarReturnType = new TypeToken>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call actionPostCreateAsync(ProxyActioncreateRequest createRequest, String idempotencyKey, String acceptEncoding, String contentEncoding, String authorization, Boolean rejectUnknownFields, String zuoraEntityIds, String zuoraTrackId, String xZuoraWSDLVersion, String zuoraVersion, String zuoraOrgIds, final ApiCallback> _callback) throws ApiException {
okhttp3.Call localVarCall = actionPostCreateValidateBeforeCall(createRequest, idempotencyKey, acceptEncoding, contentEncoding, authorization, rejectUnknownFields, zuoraEntityIds, zuoraTrackId, xZuoraWSDLVersion, zuoraVersion, zuoraOrgIds, _callback);
Type localVarReturnType = new TypeToken>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class ActionPostCreateApi {
private final ProxyActioncreateRequest createRequest;
private String idempotencyKey;
private String acceptEncoding;
private String contentEncoding;
private String authorization;
private Boolean rejectUnknownFields;
private String zuoraEntityIds;
private String zuoraTrackId;
private String xZuoraWSDLVersion;
private String zuoraVersion;
private String zuoraOrgIds;
private ActionPostCreateApi(ProxyActioncreateRequest createRequest) {
this.createRequest = createRequest;
}
/**
* 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 ActionPostCreateApi
*/
public ActionPostCreateApi 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 ActionPostCreateApi
*/
public ActionPostCreateApi 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 ActionPostCreateApi
*/
public ActionPostCreateApi contentEncoding(String contentEncoding) {
this.contentEncoding = contentEncoding;
return this;
}
/**
* Set authorization
* @param authorization The value is in the `Bearer {token}` format where {token} is a valid OAuth token generated by calling [Create an OAuth token](https://www.zuora.com/developer/api-references/api/operation/createToken). (optional)
* @return ActionPostCreateApi
*/
public ActionPostCreateApi authorization(String authorization) {
this.authorization = authorization;
return this;
}
/**
* Set rejectUnknownFields
* @param rejectUnknownFields Specifies whether the call fails if the request body contains unknown fields. With `rejectUnknownFields` set to `true`, Zuora returns a 400 response if the request body contains unknown fields. The body of the 400 response is: ```json { \"message\": \"Error - unrecognised fields\" } ``` By default, Zuora ignores unknown fields in the request body. (optional, default to false)
* @return ActionPostCreateApi
*/
public ActionPostCreateApi rejectUnknownFields(Boolean rejectUnknownFields) {
this.rejectUnknownFields = rejectUnknownFields;
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 ActionPostCreateApi
*/
public ActionPostCreateApi zuoraEntityIds(String zuoraEntityIds) {
this.zuoraEntityIds = zuoraEntityIds;
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 ActionPostCreateApi
*/
public ActionPostCreateApi zuoraTrackId(String zuoraTrackId) {
this.zuoraTrackId = zuoraTrackId;
return this;
}
/**
* Set xZuoraWSDLVersion
* @param xZuoraWSDLVersion Zuora WSDL version number. (optional, default to 79)
* @return ActionPostCreateApi
*/
public ActionPostCreateApi xZuoraWSDLVersion(String xZuoraWSDLVersion) {
this.xZuoraWSDLVersion = xZuoraWSDLVersion;
return this;
}
/**
* Set zuoraVersion
* @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20)
* @return ActionPostCreateApi
*/
public ActionPostCreateApi zuoraVersion(String zuoraVersion) {
this.zuoraVersion = zuoraVersion;
return this;
}
/**
* Set zuoraOrgIds
* @param zuoraOrgIds Comma separated IDs. If you have Zuora Multi-Org enabled, you can use this header to specify which orgs to perform the operation in. If you do not have Zuora Multi-Org enabled, you should not set this header. The IDs must be a sub-set of the user's accessible orgs. If you specify an org that the user does not have access to, the operation fails. If the header is not set, the operation is performed in scope of the user's accessible orgs. (optional)
* @return ActionPostCreateApi
*/
public ActionPostCreateApi zuoraOrgIds(String zuoraOrgIds) {
this.zuoraOrgIds = zuoraOrgIds;
return this;
}
/**
* Build call for actionPostCreate
* @param _callback ApiCallback API callback
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
*/
public List execute() throws ApiException {
ApiResponse> localVarResp = actionPostCreateWithHttpInfo(createRequest, idempotencyKey, acceptEncoding, contentEncoding, authorization, rejectUnknownFields, zuoraEntityIds, zuoraTrackId, xZuoraWSDLVersion, zuoraVersion, zuoraOrgIds);
return localVarResp.getData();
}
/**
* Execute actionPostCreate request with HTTP info returned
* @return ApiResponse<List<SaveResult>>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
*/
private ApiResponse> executeWithHttpInfo() throws ApiException {
return actionPostCreateWithHttpInfo(createRequest, idempotencyKey, acceptEncoding, contentEncoding, authorization, rejectUnknownFields, zuoraEntityIds, zuoraTrackId, xZuoraWSDLVersion, zuoraVersion, zuoraOrgIds);
}
/**
* Execute actionPostCreate 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
*/
public okhttp3.Call executeAsync(final ApiCallback> _callback) throws ApiException {
return actionPostCreateAsync(createRequest, idempotencyKey, acceptEncoding, contentEncoding, authorization, rejectUnknownFields, zuoraEntityIds, zuoraTrackId, xZuoraWSDLVersion, zuoraVersion, zuoraOrgIds, _callback);
}
}
/**
* Create
* Use the create call to create one or more objects of a specific type. You can specify different types in different create calls, but each create call must apply to only one type of object. ### Limitations This call has the following limitations: * A maximum of 50 objects are supported in a single call. * The Orders feature is not supported. * The Invoice Settlement feature is not supported. This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. * The default WSDL version for Actions is 79. To create objects according to a different WSDL version, set the `X-Zuora-WSDL-Version` header. To find out in which WSDL version a particular object or field was introduced, see [Zuora SOAP API Version History](https://knowledgecenter.zuora.com/DC_Developers/G_SOAP_API/Zuora_SOAP_API_Version_History). ### How to use this call You can create on an array of one or more zObjects. The fields you should specify can be found in the corresponding \"CRUD: Create an *zObject*\" operation. For example, to create one or multiple accounts, use the request fields in the [CRUD: Create an account](https://www.zuora.com/developer/api-references/older-api/operation/Object_PostAccount/) operation. It returns an array of SaveResults sorted in the same order, indicating the success or failure of creating each object. The following information applies to this call: * You cannot pass in null zObjects. * You can pass in a maximum of 50 zObjects at a time. * All objects must be of the same type. #### Using Create and Subscribe Calls Both the Create and Subscribe calls will create a new account. However, there are differences between the calls. Use the create call to create an account independent of a subscription. Use the subscribe call to create the account with the subscription and the initial payment information.
* @param createRequest (required)
* @return ActionPostCreateApi
*/
public ActionPostCreateApi actionPostCreateApi(ProxyActioncreateRequest createRequest) {
return new ActionPostCreateApi(createRequest);
}
private okhttp3.Call actionPostDeleteCall(ProxyActiondeleteRequest deleteRequest, String idempotencyKey, String acceptEncoding, String contentEncoding, String authorization, Boolean rejectUnknownFields, String zuoraEntityIds, String zuoraTrackId, String xZuoraWSDLVersion, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = deleteRequest;
// create path and map variables
String localVarPath = "/v1/action/delete";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (rejectUnknownFields != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("rejectUnknownFields", rejectUnknownFields));
}
if (idempotencyKey != null) {
localVarHeaderParams.put("Idempotency-Key", localVarApiClient.parameterToString(idempotencyKey));
}
if (acceptEncoding != null) {
localVarHeaderParams.put("Accept-Encoding", localVarApiClient.parameterToString(acceptEncoding));
}
if (contentEncoding != null) {
localVarHeaderParams.put("Content-Encoding", localVarApiClient.parameterToString(contentEncoding));
}
if (authorization != null) {
localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization));
}
if (zuoraEntityIds != null) {
localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds));
}
if (zuoraTrackId != null) {
localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId));
}
if (xZuoraWSDLVersion != null) {
localVarHeaderParams.put("X-Zuora-WSDL-Version", localVarApiClient.parameterToString(xZuoraWSDLVersion));
}
if (zuoraVersion != null) {
localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion));
}
if (zuoraOrgIds != null) {
localVarHeaderParams.put("Zuora-Org-Ids", localVarApiClient.parameterToString(zuoraOrgIds));
}
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "bearerAuth" };
return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call actionPostDeleteValidateBeforeCall(ProxyActiondeleteRequest deleteRequest, String idempotencyKey, String acceptEncoding, String contentEncoding, String authorization, Boolean rejectUnknownFields, String zuoraEntityIds, String zuoraTrackId, String xZuoraWSDLVersion, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'deleteRequest' is set
if (deleteRequest == null) {
throw new ApiException("Missing the required parameter 'deleteRequest' when calling actionPostDelete(Async)");
}
return actionPostDeleteCall(deleteRequest, idempotencyKey, acceptEncoding, contentEncoding, authorization, rejectUnknownFields, zuoraEntityIds, zuoraTrackId, xZuoraWSDLVersion, zuoraVersion, zuoraOrgIds, _callback);
}
/**
* Delete
* Deletes one or more objects of the same type. You can specify different types in different delete calls, but each delete call must apply only to one type of object. The following information applies to this call: * You will need to first determine the IDs for the objects you wish to delete. * You cannot pass in any null IDs. * All objects in a specific delete call must be of the same type. ### Objects per Call 50 objects are supported in a single call.
* @param deleteRequest (required)
* @param idempotencyKey Specify a unique idempotency key if you want to perform an idempotent POST or PATCH request. Do not use this header in other request types. With this header specified, the Zuora server can identify subsequent retries of the same request using this value, which prevents the same operation from being performed multiple times by accident. (optional)
* @param acceptEncoding Include the `Accept-Encoding: gzip` header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a `Content-Encoding` header with the compression algorithm so that your client can decompress it. (optional)
* @param contentEncoding Include the `Content-Encoding: gzip` header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload. (optional)
* @param authorization The value is in the `Bearer {token}` format where {token} is a valid OAuth token generated by calling [Create an OAuth token](https://www.zuora.com/developer/api-references/api/operation/createToken). (optional)
* @param rejectUnknownFields Specifies whether the call fails if the request body contains unknown fields. With `rejectUnknownFields` set to `true`, Zuora returns a 400 response if the request body contains unknown fields. The body of the 400 response is: ```json { \"message\": \"Error - unrecognised fields\" } ``` By default, Zuora ignores unknown fields in the request body. (optional, default to false)
* @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 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 xZuoraWSDLVersion Zuora WSDL version number. (optional, default to 79)
* @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20)
* @param zuoraOrgIds Comma separated IDs. If you have Zuora Multi-Org enabled, you can use this header to specify which orgs to perform the operation in. If you do not have Zuora Multi-Org enabled, you should not set this header. The IDs must be a sub-set of the user's accessible orgs. If you specify an org that the user does not have access to, the operation fails. If the header is not set, the operation is performed in scope of the user's accessible orgs. (optional)
* @return List<DeleteResult>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
*/
protected List actionPostDelete(ProxyActiondeleteRequest deleteRequest, String idempotencyKey, String acceptEncoding, String contentEncoding, String authorization, Boolean rejectUnknownFields, String zuoraEntityIds, String zuoraTrackId, String xZuoraWSDLVersion, String zuoraVersion, String zuoraOrgIds) throws ApiException {
ApiResponse> localVarResp = actionPostDeleteWithHttpInfo(deleteRequest, idempotencyKey, acceptEncoding, contentEncoding, authorization, rejectUnknownFields, zuoraEntityIds, zuoraTrackId, xZuoraWSDLVersion, zuoraVersion, zuoraOrgIds);
return localVarResp.getData();
}
private ApiResponse> actionPostDeleteWithHttpInfo(ProxyActiondeleteRequest deleteRequest, String idempotencyKey, String acceptEncoding, String contentEncoding, String authorization, Boolean rejectUnknownFields, String zuoraEntityIds, String zuoraTrackId, String xZuoraWSDLVersion, String zuoraVersion, String zuoraOrgIds) throws ApiException {
okhttp3.Call localVarCall = actionPostDeleteValidateBeforeCall(deleteRequest, idempotencyKey, acceptEncoding, contentEncoding, authorization, rejectUnknownFields, zuoraEntityIds, zuoraTrackId, xZuoraWSDLVersion, zuoraVersion, zuoraOrgIds, null);
Type localVarReturnType = new TypeToken>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call actionPostDeleteAsync(ProxyActiondeleteRequest deleteRequest, String idempotencyKey, String acceptEncoding, String contentEncoding, String authorization, Boolean rejectUnknownFields, String zuoraEntityIds, String zuoraTrackId, String xZuoraWSDLVersion, String zuoraVersion, String zuoraOrgIds, final ApiCallback> _callback) throws ApiException {
okhttp3.Call localVarCall = actionPostDeleteValidateBeforeCall(deleteRequest, idempotencyKey, acceptEncoding, contentEncoding, authorization, rejectUnknownFields, zuoraEntityIds, zuoraTrackId, xZuoraWSDLVersion, zuoraVersion, zuoraOrgIds, _callback);
Type localVarReturnType = new TypeToken>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class ActionPostDeleteApi {
private final ProxyActiondeleteRequest deleteRequest;
private String idempotencyKey;
private String acceptEncoding;
private String contentEncoding;
private String authorization;
private Boolean rejectUnknownFields;
private String zuoraEntityIds;
private String zuoraTrackId;
private String xZuoraWSDLVersion;
private String zuoraVersion;
private String zuoraOrgIds;
private ActionPostDeleteApi(ProxyActiondeleteRequest deleteRequest) {
this.deleteRequest = deleteRequest;
}
/**
* 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 ActionPostDeleteApi
*/
public ActionPostDeleteApi 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 ActionPostDeleteApi
*/
public ActionPostDeleteApi 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 ActionPostDeleteApi
*/
public ActionPostDeleteApi contentEncoding(String contentEncoding) {
this.contentEncoding = contentEncoding;
return this;
}
/**
* Set authorization
* @param authorization The value is in the `Bearer {token}` format where {token} is a valid OAuth token generated by calling [Create an OAuth token](https://www.zuora.com/developer/api-references/api/operation/createToken). (optional)
* @return ActionPostDeleteApi
*/
public ActionPostDeleteApi authorization(String authorization) {
this.authorization = authorization;
return this;
}
/**
* Set rejectUnknownFields
* @param rejectUnknownFields Specifies whether the call fails if the request body contains unknown fields. With `rejectUnknownFields` set to `true`, Zuora returns a 400 response if the request body contains unknown fields. The body of the 400 response is: ```json { \"message\": \"Error - unrecognised fields\" } ``` By default, Zuora ignores unknown fields in the request body. (optional, default to false)
* @return ActionPostDeleteApi
*/
public ActionPostDeleteApi rejectUnknownFields(Boolean rejectUnknownFields) {
this.rejectUnknownFields = rejectUnknownFields;
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 ActionPostDeleteApi
*/
public ActionPostDeleteApi zuoraEntityIds(String zuoraEntityIds) {
this.zuoraEntityIds = zuoraEntityIds;
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 ActionPostDeleteApi
*/
public ActionPostDeleteApi zuoraTrackId(String zuoraTrackId) {
this.zuoraTrackId = zuoraTrackId;
return this;
}
/**
* Set xZuoraWSDLVersion
* @param xZuoraWSDLVersion Zuora WSDL version number. (optional, default to 79)
* @return ActionPostDeleteApi
*/
public ActionPostDeleteApi xZuoraWSDLVersion(String xZuoraWSDLVersion) {
this.xZuoraWSDLVersion = xZuoraWSDLVersion;
return this;
}
/**
* Set zuoraVersion
* @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20)
* @return ActionPostDeleteApi
*/
public ActionPostDeleteApi zuoraVersion(String zuoraVersion) {
this.zuoraVersion = zuoraVersion;
return this;
}
/**
* Set zuoraOrgIds
* @param zuoraOrgIds Comma separated IDs. If you have Zuora Multi-Org enabled, you can use this header to specify which orgs to perform the operation in. If you do not have Zuora Multi-Org enabled, you should not set this header. The IDs must be a sub-set of the user's accessible orgs. If you specify an org that the user does not have access to, the operation fails. If the header is not set, the operation is performed in scope of the user's accessible orgs. (optional)
* @return ActionPostDeleteApi
*/
public ActionPostDeleteApi zuoraOrgIds(String zuoraOrgIds) {
this.zuoraOrgIds = zuoraOrgIds;
return this;
}
/**
* Build call for actionPostDelete
* @param _callback ApiCallback API callback
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
*/
public List execute() throws ApiException {
ApiResponse> localVarResp = actionPostDeleteWithHttpInfo(deleteRequest, idempotencyKey, acceptEncoding, contentEncoding, authorization, rejectUnknownFields, zuoraEntityIds, zuoraTrackId, xZuoraWSDLVersion, zuoraVersion, zuoraOrgIds);
return localVarResp.getData();
}
/**
* Execute actionPostDelete request with HTTP info returned
* @return ApiResponse<List<DeleteResult>>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
*/
private ApiResponse> executeWithHttpInfo() throws ApiException {
return actionPostDeleteWithHttpInfo(deleteRequest, idempotencyKey, acceptEncoding, contentEncoding, authorization, rejectUnknownFields, zuoraEntityIds, zuoraTrackId, xZuoraWSDLVersion, zuoraVersion, zuoraOrgIds);
}
/**
* Execute actionPostDelete 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
*/
public okhttp3.Call executeAsync(final ApiCallback> _callback) throws ApiException {
return actionPostDeleteAsync(deleteRequest, idempotencyKey, acceptEncoding, contentEncoding, authorization, rejectUnknownFields, zuoraEntityIds, zuoraTrackId, xZuoraWSDLVersion, zuoraVersion, zuoraOrgIds, _callback);
}
}
/**
* Delete
* Deletes one or more objects of the same type. You can specify different types in different delete calls, but each delete call must apply only to one type of object. The following information applies to this call: * You will need to first determine the IDs for the objects you wish to delete. * You cannot pass in any null IDs. * All objects in a specific delete call must be of the same type. ### Objects per Call 50 objects are supported in a single call.
* @param deleteRequest (required)
* @return ActionPostDeleteApi
*/
public ActionPostDeleteApi actionPostDeleteApi(ProxyActiondeleteRequest deleteRequest) {
return new ActionPostDeleteApi(deleteRequest);
}
private okhttp3.Call actionPostQueryCall(ProxyActionqueryRequest queryRequest, String idempotencyKey, String acceptEncoding, String contentEncoding, String authorization, Boolean rejectUnknownFields, String zuoraEntityIds, String zuoraTrackId, String xZuoraWSDLVersion, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = queryRequest;
// create path and map variables
String localVarPath = "/v1/action/query";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (rejectUnknownFields != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("rejectUnknownFields", rejectUnknownFields));
}
if (idempotencyKey != null) {
localVarHeaderParams.put("Idempotency-Key", localVarApiClient.parameterToString(idempotencyKey));
}
if (acceptEncoding != null) {
localVarHeaderParams.put("Accept-Encoding", localVarApiClient.parameterToString(acceptEncoding));
}
if (contentEncoding != null) {
localVarHeaderParams.put("Content-Encoding", localVarApiClient.parameterToString(contentEncoding));
}
if (authorization != null) {
localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization));
}
if (zuoraEntityIds != null) {
localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds));
}
if (zuoraTrackId != null) {
localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId));
}
if (xZuoraWSDLVersion != null) {
localVarHeaderParams.put("X-Zuora-WSDL-Version", localVarApiClient.parameterToString(xZuoraWSDLVersion));
}
if (zuoraVersion != null) {
localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion));
}
if (zuoraOrgIds != null) {
localVarHeaderParams.put("Zuora-Org-Ids", localVarApiClient.parameterToString(zuoraOrgIds));
}
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "bearerAuth" };
return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call actionPostQueryValidateBeforeCall(ProxyActionqueryRequest queryRequest, String idempotencyKey, String acceptEncoding, String contentEncoding, String authorization, Boolean rejectUnknownFields, String zuoraEntityIds, String zuoraTrackId, String xZuoraWSDLVersion, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'queryRequest' is set
if (queryRequest == null) {
throw new ApiException("Missing the required parameter 'queryRequest' when calling actionPostQuery(Async)");
}
return actionPostQueryCall(queryRequest, idempotencyKey, acceptEncoding, contentEncoding, authorization, rejectUnknownFields, zuoraEntityIds, zuoraTrackId, xZuoraWSDLVersion, zuoraVersion, zuoraOrgIds, _callback);
}
/**
* Query
* The query call sends a query expression by specifying the object to query, the fields to retrieve from that object, and any filters to determine whether a given object should be queried. You can use [Zuora Object Query Language](https://knowledgecenter.zuora.com/DC_Developers/K_Zuora_Object_Query_Language) (ZOQL) to construct those queries, passing them through the `queryString`. Once the call is made, the API executes the query against the specified object and returns a query response object to your application. Your application can then iterate through rows in the query response to retrieve information. ### Limitations This call has the following limitations: * All [ZOQL limitations](https://knowledgecenter.zuora.com/Central_Platform/Query/ZOQL#ZOQL_Limitations) apply. * All ZOQL keywords must be in lower case. * The number of records returned is limited to 2000 records. * The Invoice Settlement feature is not supported. This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. * The Orders feature is not supported, which means that the objects listed in [Orders Object Model](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/BA_Orders_Object_Model) are not supported. * The Active Rating feature is not supported. * The default WSDL version for Actions is 79. To query objects or fields according to a different WSDL version, set the `X-Zuora-WSDL-Version` header. To find out in which WSDL version a particular object or field was introduced, see [Zuora SOAP API Version History](https://knowledgecenter.zuora.com/DC_Developers/G_SOAP_API/Zuora_SOAP_API_Version_History).
* @param queryRequest (required)
* @param idempotencyKey Specify a unique idempotency key if you want to perform an idempotent POST or PATCH request. Do not use this header in other request types. With this header specified, the Zuora server can identify subsequent retries of the same request using this value, which prevents the same operation from being performed multiple times by accident. (optional)
* @param acceptEncoding Include the `Accept-Encoding: gzip` header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a `Content-Encoding` header with the compression algorithm so that your client can decompress it. (optional)
* @param contentEncoding Include the `Content-Encoding: gzip` header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload. (optional)
* @param authorization The value is in the `Bearer {token}` format where {token} is a valid OAuth token generated by calling [Create an OAuth token](https://www.zuora.com/developer/api-references/api/operation/createToken). (optional)
* @param rejectUnknownFields Specifies whether the call fails if the request body contains unknown fields. With `rejectUnknownFields` set to `true`, Zuora returns a 400 response if the request body contains unknown fields. The body of the 400 response is: ```json { \"message\": \"Error - unrecognised fields\" } ``` By default, Zuora ignores unknown fields in the request body. (optional, default to false)
* @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 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 xZuoraWSDLVersion Zuora WSDL version number. (optional, default to 79)
* @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20)
* @param zuoraOrgIds Comma separated IDs. If you have Zuora Multi-Org enabled, you can use this header to specify which orgs to perform the operation in. If you do not have Zuora Multi-Org enabled, you should not set this header. The IDs must be a sub-set of the user's accessible orgs. If you specify an org that the user does not have access to, the operation fails. If the header is not set, the operation is performed in scope of the user's accessible orgs. (optional)
* @return ProxyActionqueryResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
*/
protected ProxyActionqueryResponse actionPostQuery(ProxyActionqueryRequest queryRequest, String idempotencyKey, String acceptEncoding, String contentEncoding, String authorization, Boolean rejectUnknownFields, String zuoraEntityIds, String zuoraTrackId, String xZuoraWSDLVersion, String zuoraVersion, String zuoraOrgIds) throws ApiException {
ApiResponse localVarResp = actionPostQueryWithHttpInfo(queryRequest, idempotencyKey, acceptEncoding, contentEncoding, authorization, rejectUnknownFields, zuoraEntityIds, zuoraTrackId, xZuoraWSDLVersion, zuoraVersion, zuoraOrgIds);
return localVarResp.getData();
}
private ApiResponse actionPostQueryWithHttpInfo(ProxyActionqueryRequest queryRequest, String idempotencyKey, String acceptEncoding, String contentEncoding, String authorization, Boolean rejectUnknownFields, String zuoraEntityIds, String zuoraTrackId, String xZuoraWSDLVersion, String zuoraVersion, String zuoraOrgIds) throws ApiException {
okhttp3.Call localVarCall = actionPostQueryValidateBeforeCall(queryRequest, idempotencyKey, acceptEncoding, contentEncoding, authorization, rejectUnknownFields, zuoraEntityIds, zuoraTrackId, xZuoraWSDLVersion, zuoraVersion, zuoraOrgIds, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call actionPostQueryAsync(ProxyActionqueryRequest queryRequest, String idempotencyKey, String acceptEncoding, String contentEncoding, String authorization, Boolean rejectUnknownFields, String zuoraEntityIds, String zuoraTrackId, String xZuoraWSDLVersion, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = actionPostQueryValidateBeforeCall(queryRequest, idempotencyKey, acceptEncoding, contentEncoding, authorization, rejectUnknownFields, zuoraEntityIds, zuoraTrackId, xZuoraWSDLVersion, zuoraVersion, zuoraOrgIds, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class ActionPostQueryApi {
private final ProxyActionqueryRequest queryRequest;
private String idempotencyKey;
private String acceptEncoding;
private String contentEncoding;
private String authorization;
private Boolean rejectUnknownFields;
private String zuoraEntityIds;
private String zuoraTrackId;
private String xZuoraWSDLVersion;
private String zuoraVersion;
private String zuoraOrgIds;
private ActionPostQueryApi(ProxyActionqueryRequest queryRequest) {
this.queryRequest = queryRequest;
}
/**
* 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 ActionPostQueryApi
*/
public ActionPostQueryApi 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 ActionPostQueryApi
*/
public ActionPostQueryApi 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 ActionPostQueryApi
*/
public ActionPostQueryApi contentEncoding(String contentEncoding) {
this.contentEncoding = contentEncoding;
return this;
}
/**
* Set authorization
* @param authorization The value is in the `Bearer {token}` format where {token} is a valid OAuth token generated by calling [Create an OAuth token](https://www.zuora.com/developer/api-references/api/operation/createToken). (optional)
* @return ActionPostQueryApi
*/
public ActionPostQueryApi authorization(String authorization) {
this.authorization = authorization;
return this;
}
/**
* Set rejectUnknownFields
* @param rejectUnknownFields Specifies whether the call fails if the request body contains unknown fields. With `rejectUnknownFields` set to `true`, Zuora returns a 400 response if the request body contains unknown fields. The body of the 400 response is: ```json { \"message\": \"Error - unrecognised fields\" } ``` By default, Zuora ignores unknown fields in the request body. (optional, default to false)
* @return ActionPostQueryApi
*/
public ActionPostQueryApi rejectUnknownFields(Boolean rejectUnknownFields) {
this.rejectUnknownFields = rejectUnknownFields;
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 ActionPostQueryApi
*/
public ActionPostQueryApi zuoraEntityIds(String zuoraEntityIds) {
this.zuoraEntityIds = zuoraEntityIds;
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 ActionPostQueryApi
*/
public ActionPostQueryApi zuoraTrackId(String zuoraTrackId) {
this.zuoraTrackId = zuoraTrackId;
return this;
}
/**
* Set xZuoraWSDLVersion
* @param xZuoraWSDLVersion Zuora WSDL version number. (optional, default to 79)
* @return ActionPostQueryApi
*/
public ActionPostQueryApi xZuoraWSDLVersion(String xZuoraWSDLVersion) {
this.xZuoraWSDLVersion = xZuoraWSDLVersion;
return this;
}
/**
* Set zuoraVersion
* @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20)
* @return ActionPostQueryApi
*/
public ActionPostQueryApi zuoraVersion(String zuoraVersion) {
this.zuoraVersion = zuoraVersion;
return this;
}
/**
* Set zuoraOrgIds
* @param zuoraOrgIds Comma separated IDs. If you have Zuora Multi-Org enabled, you can use this header to specify which orgs to perform the operation in. If you do not have Zuora Multi-Org enabled, you should not set this header. The IDs must be a sub-set of the user's accessible orgs. If you specify an org that the user does not have access to, the operation fails. If the header is not set, the operation is performed in scope of the user's accessible orgs. (optional)
* @return ActionPostQueryApi
*/
public ActionPostQueryApi zuoraOrgIds(String zuoraOrgIds) {
this.zuoraOrgIds = zuoraOrgIds;
return this;
}
/**
* Build call for actionPostQuery
* @param _callback ApiCallback API callback
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
*/
public ProxyActionqueryResponse execute() throws ApiException {
ApiResponse localVarResp = actionPostQueryWithHttpInfo(queryRequest, idempotencyKey, acceptEncoding, contentEncoding, authorization, rejectUnknownFields, zuoraEntityIds, zuoraTrackId, xZuoraWSDLVersion, zuoraVersion, zuoraOrgIds);
return localVarResp.getData();
}
/**
* Execute actionPostQuery request with HTTP info returned
* @return ApiResponse<ProxyActionqueryResponse>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
*/
private ApiResponse executeWithHttpInfo() throws ApiException {
return actionPostQueryWithHttpInfo(queryRequest, idempotencyKey, acceptEncoding, contentEncoding, authorization, rejectUnknownFields, zuoraEntityIds, zuoraTrackId, xZuoraWSDLVersion, zuoraVersion, zuoraOrgIds);
}
/**
* Execute actionPostQuery 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
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return actionPostQueryAsync(queryRequest, idempotencyKey, acceptEncoding, contentEncoding, authorization, rejectUnknownFields, zuoraEntityIds, zuoraTrackId, xZuoraWSDLVersion, zuoraVersion, zuoraOrgIds, _callback);
}
}
/**
* Query
* The query call sends a query expression by specifying the object to query, the fields to retrieve from that object, and any filters to determine whether a given object should be queried. You can use [Zuora Object Query Language](https://knowledgecenter.zuora.com/DC_Developers/K_Zuora_Object_Query_Language) (ZOQL) to construct those queries, passing them through the `queryString`. Once the call is made, the API executes the query against the specified object and returns a query response object to your application. Your application can then iterate through rows in the query response to retrieve information. ### Limitations This call has the following limitations: * All [ZOQL limitations](https://knowledgecenter.zuora.com/Central_Platform/Query/ZOQL#ZOQL_Limitations) apply. * All ZOQL keywords must be in lower case. * The number of records returned is limited to 2000 records. * The Invoice Settlement feature is not supported. This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. * The Orders feature is not supported, which means that the objects listed in [Orders Object Model](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/BA_Orders_Object_Model) are not supported. * The Active Rating feature is not supported. * The default WSDL version for Actions is 79. To query objects or fields according to a different WSDL version, set the `X-Zuora-WSDL-Version` header. To find out in which WSDL version a particular object or field was introduced, see [Zuora SOAP API Version History](https://knowledgecenter.zuora.com/DC_Developers/G_SOAP_API/Zuora_SOAP_API_Version_History).
* @param queryRequest (required)
* @return ActionPostQueryApi
*/
public ActionPostQueryApi actionPostQueryApi(ProxyActionqueryRequest queryRequest) {
return new ActionPostQueryApi(queryRequest);
}
private okhttp3.Call actionPostqueryMoreCall(ProxyActionqueryMoreRequest queryMoreRequest, String idempotencyKey, String acceptEncoding, String contentEncoding, String authorization, Boolean rejectUnknownFields, String zuoraEntityIds, String zuoraTrackId, String xZuoraWSDLVersion, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = queryMoreRequest;
// create path and map variables
String localVarPath = "/v1/action/queryMore";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (rejectUnknownFields != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("rejectUnknownFields", rejectUnknownFields));
}
if (idempotencyKey != null) {
localVarHeaderParams.put("Idempotency-Key", localVarApiClient.parameterToString(idempotencyKey));
}
if (acceptEncoding != null) {
localVarHeaderParams.put("Accept-Encoding", localVarApiClient.parameterToString(acceptEncoding));
}
if (contentEncoding != null) {
localVarHeaderParams.put("Content-Encoding", localVarApiClient.parameterToString(contentEncoding));
}
if (authorization != null) {
localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization));
}
if (zuoraEntityIds != null) {
localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds));
}
if (zuoraTrackId != null) {
localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId));
}
if (xZuoraWSDLVersion != null) {
localVarHeaderParams.put("X-Zuora-WSDL-Version", localVarApiClient.parameterToString(xZuoraWSDLVersion));
}
if (zuoraVersion != null) {
localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion));
}
if (zuoraOrgIds != null) {
localVarHeaderParams.put("Zuora-Org-Ids", localVarApiClient.parameterToString(zuoraOrgIds));
}
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "bearerAuth" };
return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call actionPostqueryMoreValidateBeforeCall(ProxyActionqueryMoreRequest queryMoreRequest, String idempotencyKey, String acceptEncoding, String contentEncoding, String authorization, Boolean rejectUnknownFields, String zuoraEntityIds, String zuoraTrackId, String xZuoraWSDLVersion, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'queryMoreRequest' is set
if (queryMoreRequest == null) {
throw new ApiException("Missing the required parameter 'queryMoreRequest' when calling actionPostqueryMore(Async)");
}
return actionPostqueryMoreCall(queryMoreRequest, idempotencyKey, acceptEncoding, contentEncoding, authorization, rejectUnknownFields, zuoraEntityIds, zuoraTrackId, xZuoraWSDLVersion, zuoraVersion, zuoraOrgIds, _callback);
}
/**
* QueryMore
* Use queryMore to request additional results from a previous query call. If your initial query call returns more than 2000 results, you can use queryMore to query for the additional results. Any `queryLocator` results greater than 2,000, will only be stored by Zuora for 5 days before it is deleted. This call sends a request for additional results from an initial query call. If the initial query call returns more than 2000 results, you can use the `queryLocator` returned from query to request the next set of results. **Note:** Zuora expires queryMore cursors after 15 minutes of activity. To use queryMore, you first construct a query call. By default, the query call will return up to 2000 results. If there are more than 2000 results, query will return a boolean `done`, which will be marked as `false`, and a `queryLocator`, which is a marker you will pass to queryMore to get the next set of results.
* @param queryMoreRequest (required)
* @param idempotencyKey Specify a unique idempotency key if you want to perform an idempotent POST or PATCH request. Do not use this header in other request types. With this header specified, the Zuora server can identify subsequent retries of the same request using this value, which prevents the same operation from being performed multiple times by accident. (optional)
* @param acceptEncoding Include the `Accept-Encoding: gzip` header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a `Content-Encoding` header with the compression algorithm so that your client can decompress it. (optional)
* @param contentEncoding Include the `Content-Encoding: gzip` header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload. (optional)
* @param authorization The value is in the `Bearer {token}` format where {token} is a valid OAuth token generated by calling [Create an OAuth token](https://www.zuora.com/developer/api-references/api/operation/createToken). (optional)
* @param rejectUnknownFields Specifies whether the call fails if the request body contains unknown fields. With `rejectUnknownFields` set to `true`, Zuora returns a 400 response if the request body contains unknown fields. The body of the 400 response is: ```json { \"message\": \"Error - unrecognised fields\" } ``` By default, Zuora ignores unknown fields in the request body. (optional, default to false)
* @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 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 xZuoraWSDLVersion Zuora WSDL version number. (optional, default to 79)
* @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20)
* @param zuoraOrgIds Comma separated IDs. If you have Zuora Multi-Org enabled, you can use this header to specify which orgs to perform the operation in. If you do not have Zuora Multi-Org enabled, you should not set this header. The IDs must be a sub-set of the user's accessible orgs. If you specify an org that the user does not have access to, the operation fails. If the header is not set, the operation is performed in scope of the user's accessible orgs. (optional)
* @return ProxyActionqueryMoreResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
*/
protected ProxyActionqueryMoreResponse actionPostqueryMore(ProxyActionqueryMoreRequest queryMoreRequest, String idempotencyKey, String acceptEncoding, String contentEncoding, String authorization, Boolean rejectUnknownFields, String zuoraEntityIds, String zuoraTrackId, String xZuoraWSDLVersion, String zuoraVersion, String zuoraOrgIds) throws ApiException {
ApiResponse localVarResp = actionPostqueryMoreWithHttpInfo(queryMoreRequest, idempotencyKey, acceptEncoding, contentEncoding, authorization, rejectUnknownFields, zuoraEntityIds, zuoraTrackId, xZuoraWSDLVersion, zuoraVersion, zuoraOrgIds);
return localVarResp.getData();
}
private ApiResponse actionPostqueryMoreWithHttpInfo(ProxyActionqueryMoreRequest queryMoreRequest, String idempotencyKey, String acceptEncoding, String contentEncoding, String authorization, Boolean rejectUnknownFields, String zuoraEntityIds, String zuoraTrackId, String xZuoraWSDLVersion, String zuoraVersion, String zuoraOrgIds) throws ApiException {
okhttp3.Call localVarCall = actionPostqueryMoreValidateBeforeCall(queryMoreRequest, idempotencyKey, acceptEncoding, contentEncoding, authorization, rejectUnknownFields, zuoraEntityIds, zuoraTrackId, xZuoraWSDLVersion, zuoraVersion, zuoraOrgIds, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call actionPostqueryMoreAsync(ProxyActionqueryMoreRequest queryMoreRequest, String idempotencyKey, String acceptEncoding, String contentEncoding, String authorization, Boolean rejectUnknownFields, String zuoraEntityIds, String zuoraTrackId, String xZuoraWSDLVersion, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = actionPostqueryMoreValidateBeforeCall(queryMoreRequest, idempotencyKey, acceptEncoding, contentEncoding, authorization, rejectUnknownFields, zuoraEntityIds, zuoraTrackId, xZuoraWSDLVersion, zuoraVersion, zuoraOrgIds, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class ActionPostqueryMoreApi {
private final ProxyActionqueryMoreRequest queryMoreRequest;
private String idempotencyKey;
private String acceptEncoding;
private String contentEncoding;
private String authorization;
private Boolean rejectUnknownFields;
private String zuoraEntityIds;
private String zuoraTrackId;
private String xZuoraWSDLVersion;
private String zuoraVersion;
private String zuoraOrgIds;
private ActionPostqueryMoreApi(ProxyActionqueryMoreRequest queryMoreRequest) {
this.queryMoreRequest = queryMoreRequest;
}
/**
* 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 ActionPostqueryMoreApi
*/
public ActionPostqueryMoreApi 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 ActionPostqueryMoreApi
*/
public ActionPostqueryMoreApi 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 ActionPostqueryMoreApi
*/
public ActionPostqueryMoreApi contentEncoding(String contentEncoding) {
this.contentEncoding = contentEncoding;
return this;
}
/**
* Set authorization
* @param authorization The value is in the `Bearer {token}` format where {token} is a valid OAuth token generated by calling [Create an OAuth token](https://www.zuora.com/developer/api-references/api/operation/createToken). (optional)
* @return ActionPostqueryMoreApi
*/
public ActionPostqueryMoreApi authorization(String authorization) {
this.authorization = authorization;
return this;
}
/**
* Set rejectUnknownFields
* @param rejectUnknownFields Specifies whether the call fails if the request body contains unknown fields. With `rejectUnknownFields` set to `true`, Zuora returns a 400 response if the request body contains unknown fields. The body of the 400 response is: ```json { \"message\": \"Error - unrecognised fields\" } ``` By default, Zuora ignores unknown fields in the request body. (optional, default to false)
* @return ActionPostqueryMoreApi
*/
public ActionPostqueryMoreApi rejectUnknownFields(Boolean rejectUnknownFields) {
this.rejectUnknownFields = rejectUnknownFields;
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 ActionPostqueryMoreApi
*/
public ActionPostqueryMoreApi zuoraEntityIds(String zuoraEntityIds) {
this.zuoraEntityIds = zuoraEntityIds;
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 ActionPostqueryMoreApi
*/
public ActionPostqueryMoreApi zuoraTrackId(String zuoraTrackId) {
this.zuoraTrackId = zuoraTrackId;
return this;
}
/**
* Set xZuoraWSDLVersion
* @param xZuoraWSDLVersion Zuora WSDL version number. (optional, default to 79)
* @return ActionPostqueryMoreApi
*/
public ActionPostqueryMoreApi xZuoraWSDLVersion(String xZuoraWSDLVersion) {
this.xZuoraWSDLVersion = xZuoraWSDLVersion;
return this;
}
/**
* Set zuoraVersion
* @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20)
* @return ActionPostqueryMoreApi
*/
public ActionPostqueryMoreApi zuoraVersion(String zuoraVersion) {
this.zuoraVersion = zuoraVersion;
return this;
}
/**
* Set zuoraOrgIds
* @param zuoraOrgIds Comma separated IDs. If you have Zuora Multi-Org enabled, you can use this header to specify which orgs to perform the operation in. If you do not have Zuora Multi-Org enabled, you should not set this header. The IDs must be a sub-set of the user's accessible orgs. If you specify an org that the user does not have access to, the operation fails. If the header is not set, the operation is performed in scope of the user's accessible orgs. (optional)
* @return ActionPostqueryMoreApi
*/
public ActionPostqueryMoreApi zuoraOrgIds(String zuoraOrgIds) {
this.zuoraOrgIds = zuoraOrgIds;
return this;
}
/**
* Build call for actionPostqueryMore
* @param _callback ApiCallback API callback
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
*/
public ProxyActionqueryMoreResponse execute() throws ApiException {
ApiResponse localVarResp = actionPostqueryMoreWithHttpInfo(queryMoreRequest, idempotencyKey, acceptEncoding, contentEncoding, authorization, rejectUnknownFields, zuoraEntityIds, zuoraTrackId, xZuoraWSDLVersion, zuoraVersion, zuoraOrgIds);
return localVarResp.getData();
}
/**
* Execute actionPostqueryMore request with HTTP info returned
* @return ApiResponse<ProxyActionqueryMoreResponse>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
*/
private ApiResponse executeWithHttpInfo() throws ApiException {
return actionPostqueryMoreWithHttpInfo(queryMoreRequest, idempotencyKey, acceptEncoding, contentEncoding, authorization, rejectUnknownFields, zuoraEntityIds, zuoraTrackId, xZuoraWSDLVersion, zuoraVersion, zuoraOrgIds);
}
/**
* Execute actionPostqueryMore 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
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return actionPostqueryMoreAsync(queryMoreRequest, idempotencyKey, acceptEncoding, contentEncoding, authorization, rejectUnknownFields, zuoraEntityIds, zuoraTrackId, xZuoraWSDLVersion, zuoraVersion, zuoraOrgIds, _callback);
}
}
/**
* QueryMore
* Use queryMore to request additional results from a previous query call. If your initial query call returns more than 2000 results, you can use queryMore to query for the additional results. Any `queryLocator` results greater than 2,000, will only be stored by Zuora for 5 days before it is deleted. This call sends a request for additional results from an initial query call. If the initial query call returns more than 2000 results, you can use the `queryLocator` returned from query to request the next set of results. **Note:** Zuora expires queryMore cursors after 15 minutes of activity. To use queryMore, you first construct a query call. By default, the query call will return up to 2000 results. If there are more than 2000 results, query will return a boolean `done`, which will be marked as `false`, and a `queryLocator`, which is a marker you will pass to queryMore to get the next set of results.
* @param queryMoreRequest (required)
* @return ActionPostqueryMoreApi
*/
public ActionPostqueryMoreApi actionPostqueryMoreApi(ProxyActionqueryMoreRequest queryMoreRequest) {
return new ActionPostqueryMoreApi(queryMoreRequest);
}
private okhttp3.Call actionPostupdateCall(ProxyActionupdateRequest updateRequest, String idempotencyKey, String acceptEncoding, String contentEncoding, String authorization, Boolean rejectUnknownFields, String zuoraEntityIds, String zuoraTrackId, String xZuoraWSDLVersion, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = updateRequest;
// create path and map variables
String localVarPath = "/v1/action/update";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (rejectUnknownFields != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("rejectUnknownFields", rejectUnknownFields));
}
if (idempotencyKey != null) {
localVarHeaderParams.put("Idempotency-Key", localVarApiClient.parameterToString(idempotencyKey));
}
if (acceptEncoding != null) {
localVarHeaderParams.put("Accept-Encoding", localVarApiClient.parameterToString(acceptEncoding));
}
if (contentEncoding != null) {
localVarHeaderParams.put("Content-Encoding", localVarApiClient.parameterToString(contentEncoding));
}
if (authorization != null) {
localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization));
}
if (zuoraEntityIds != null) {
localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds));
}
if (zuoraTrackId != null) {
localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId));
}
if (xZuoraWSDLVersion != null) {
localVarHeaderParams.put("X-Zuora-WSDL-Version", localVarApiClient.parameterToString(xZuoraWSDLVersion));
}
if (zuoraVersion != null) {
localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion));
}
if (zuoraOrgIds != null) {
localVarHeaderParams.put("Zuora-Org-Ids", localVarApiClient.parameterToString(zuoraOrgIds));
}
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "bearerAuth" };
return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call actionPostupdateValidateBeforeCall(ProxyActionupdateRequest updateRequest, String idempotencyKey, String acceptEncoding, String contentEncoding, String authorization, Boolean rejectUnknownFields, String zuoraEntityIds, String zuoraTrackId, String xZuoraWSDLVersion, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'updateRequest' is set
if (updateRequest == null) {
throw new ApiException("Missing the required parameter 'updateRequest' when calling actionPostupdate(Async)");
}
return actionPostupdateCall(updateRequest, idempotencyKey, acceptEncoding, contentEncoding, authorization, rejectUnknownFields, zuoraEntityIds, zuoraTrackId, xZuoraWSDLVersion, zuoraVersion, zuoraOrgIds, _callback);
}
/**
* Update
* Updates the information in one or more objects of the same type. You can specify different types of objects in different update calls, but each specific update call must apply to only one type of object. ### Limitations This call has the following limitations: * A maximum of 50 objects are supported in a single call. * The Invoice Settlement feature is not supported. This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. * The default WSDL version for Actions is 79. To update objects or fields according to a different WSDL version, set the `X-Zuora-WSDL-Version` header. To find out in which WSDL version a particular object or field was introduced, see [Zuora SOAP API Version History](https://knowledgecenter.zuora.com/DC_Developers/G_SOAP_API/Zuora_SOAP_API_Version_History). ### How to use this call? You can update an array of one or more zObjects. The fields you should specify can be found in the corresponding \"CRUD: Update an *zObject*\" operation. For example, to update one or multiple accounts, use the request fields in the [CRUD: Update an account](https://www.zuora.com/developer/api-references/older-api/operation/Object_PutAccount/) operation. It returns an array of SaveResults sorted in the same order, indicating the success or failure of updating each object. The following information applies to this call: * You cannot pass in null zObjects. * You can pass in a maximum of 50 zObjects at a time. * All objects must be of the same type. * For each field in each object, you must determine that object's ID. Then populate the fields that you want update with the new information. * Zuora ignores unrecognized fields in update calls. For example, if an optional field is spelled incorrectly or a field that does not exist is specified, Zuora ignores the field and continues to process the call. No error message is returned for unrecognized fields.
* @param updateRequest (required)
* @param idempotencyKey Specify a unique idempotency key if you want to perform an idempotent POST or PATCH request. Do not use this header in other request types. With this header specified, the Zuora server can identify subsequent retries of the same request using this value, which prevents the same operation from being performed multiple times by accident. (optional)
* @param acceptEncoding Include the `Accept-Encoding: gzip` header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a `Content-Encoding` header with the compression algorithm so that your client can decompress it. (optional)
* @param contentEncoding Include the `Content-Encoding: gzip` header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload. (optional)
* @param authorization The value is in the `Bearer {token}` format where {token} is a valid OAuth token generated by calling [Create an OAuth token](https://www.zuora.com/developer/api-references/api/operation/createToken). (optional)
* @param rejectUnknownFields Specifies whether the call fails if the request body contains unknown fields. With `rejectUnknownFields` set to `true`, Zuora returns a 400 response if the request body contains unknown fields. The body of the 400 response is: ```json { \"message\": \"Error - unrecognised fields\" } ``` By default, Zuora ignores unknown fields in the request body. (optional, default to false)
* @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 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 xZuoraWSDLVersion Zuora WSDL version number. (optional, default to 79)
* @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20)
* @param zuoraOrgIds Comma separated IDs. If you have Zuora Multi-Org enabled, you can use this header to specify which orgs to perform the operation in. If you do not have Zuora Multi-Org enabled, you should not set this header. The IDs must be a sub-set of the user's accessible orgs. If you specify an org that the user does not have access to, the operation fails. If the header is not set, the operation is performed in scope of the user's accessible orgs. (optional)
* @return List<SaveResult>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
*/
protected List actionPostupdate(ProxyActionupdateRequest updateRequest, String idempotencyKey, String acceptEncoding, String contentEncoding, String authorization, Boolean rejectUnknownFields, String zuoraEntityIds, String zuoraTrackId, String xZuoraWSDLVersion, String zuoraVersion, String zuoraOrgIds) throws ApiException {
ApiResponse> localVarResp = actionPostupdateWithHttpInfo(updateRequest, idempotencyKey, acceptEncoding, contentEncoding, authorization, rejectUnknownFields, zuoraEntityIds, zuoraTrackId, xZuoraWSDLVersion, zuoraVersion, zuoraOrgIds);
return localVarResp.getData();
}
private ApiResponse> actionPostupdateWithHttpInfo(ProxyActionupdateRequest updateRequest, String idempotencyKey, String acceptEncoding, String contentEncoding, String authorization, Boolean rejectUnknownFields, String zuoraEntityIds, String zuoraTrackId, String xZuoraWSDLVersion, String zuoraVersion, String zuoraOrgIds) throws ApiException {
okhttp3.Call localVarCall = actionPostupdateValidateBeforeCall(updateRequest, idempotencyKey, acceptEncoding, contentEncoding, authorization, rejectUnknownFields, zuoraEntityIds, zuoraTrackId, xZuoraWSDLVersion, zuoraVersion, zuoraOrgIds, null);
Type localVarReturnType = new TypeToken>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call actionPostupdateAsync(ProxyActionupdateRequest updateRequest, String idempotencyKey, String acceptEncoding, String contentEncoding, String authorization, Boolean rejectUnknownFields, String zuoraEntityIds, String zuoraTrackId, String xZuoraWSDLVersion, String zuoraVersion, String zuoraOrgIds, final ApiCallback> _callback) throws ApiException {
okhttp3.Call localVarCall = actionPostupdateValidateBeforeCall(updateRequest, idempotencyKey, acceptEncoding, contentEncoding, authorization, rejectUnknownFields, zuoraEntityIds, zuoraTrackId, xZuoraWSDLVersion, zuoraVersion, zuoraOrgIds, _callback);
Type localVarReturnType = new TypeToken>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class ActionPostupdateApi {
private final ProxyActionupdateRequest updateRequest;
private String idempotencyKey;
private String acceptEncoding;
private String contentEncoding;
private String authorization;
private Boolean rejectUnknownFields;
private String zuoraEntityIds;
private String zuoraTrackId;
private String xZuoraWSDLVersion;
private String zuoraVersion;
private String zuoraOrgIds;
private ActionPostupdateApi(ProxyActionupdateRequest updateRequest) {
this.updateRequest = updateRequest;
}
/**
* 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 ActionPostupdateApi
*/
public ActionPostupdateApi 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 ActionPostupdateApi
*/
public ActionPostupdateApi 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 ActionPostupdateApi
*/
public ActionPostupdateApi contentEncoding(String contentEncoding) {
this.contentEncoding = contentEncoding;
return this;
}
/**
* Set authorization
* @param authorization The value is in the `Bearer {token}` format where {token} is a valid OAuth token generated by calling [Create an OAuth token](https://www.zuora.com/developer/api-references/api/operation/createToken). (optional)
* @return ActionPostupdateApi
*/
public ActionPostupdateApi authorization(String authorization) {
this.authorization = authorization;
return this;
}
/**
* Set rejectUnknownFields
* @param rejectUnknownFields Specifies whether the call fails if the request body contains unknown fields. With `rejectUnknownFields` set to `true`, Zuora returns a 400 response if the request body contains unknown fields. The body of the 400 response is: ```json { \"message\": \"Error - unrecognised fields\" } ``` By default, Zuora ignores unknown fields in the request body. (optional, default to false)
* @return ActionPostupdateApi
*/
public ActionPostupdateApi rejectUnknownFields(Boolean rejectUnknownFields) {
this.rejectUnknownFields = rejectUnknownFields;
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 ActionPostupdateApi
*/
public ActionPostupdateApi zuoraEntityIds(String zuoraEntityIds) {
this.zuoraEntityIds = zuoraEntityIds;
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 ActionPostupdateApi
*/
public ActionPostupdateApi zuoraTrackId(String zuoraTrackId) {
this.zuoraTrackId = zuoraTrackId;
return this;
}
/**
* Set xZuoraWSDLVersion
* @param xZuoraWSDLVersion Zuora WSDL version number. (optional, default to 79)
* @return ActionPostupdateApi
*/
public ActionPostupdateApi xZuoraWSDLVersion(String xZuoraWSDLVersion) {
this.xZuoraWSDLVersion = xZuoraWSDLVersion;
return this;
}
/**
* Set zuoraVersion
* @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20)
* @return ActionPostupdateApi
*/
public ActionPostupdateApi zuoraVersion(String zuoraVersion) {
this.zuoraVersion = zuoraVersion;
return this;
}
/**
* Set zuoraOrgIds
* @param zuoraOrgIds Comma separated IDs. If you have Zuora Multi-Org enabled, you can use this header to specify which orgs to perform the operation in. If you do not have Zuora Multi-Org enabled, you should not set this header. The IDs must be a sub-set of the user's accessible orgs. If you specify an org that the user does not have access to, the operation fails. If the header is not set, the operation is performed in scope of the user's accessible orgs. (optional)
* @return ActionPostupdateApi
*/
public ActionPostupdateApi zuoraOrgIds(String zuoraOrgIds) {
this.zuoraOrgIds = zuoraOrgIds;
return this;
}
/**
* Build call for actionPostupdate
* @param _callback ApiCallback API callback
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
*/
public List execute() throws ApiException {
ApiResponse> localVarResp = actionPostupdateWithHttpInfo(updateRequest, idempotencyKey, acceptEncoding, contentEncoding, authorization, rejectUnknownFields, zuoraEntityIds, zuoraTrackId, xZuoraWSDLVersion, zuoraVersion, zuoraOrgIds);
return localVarResp.getData();
}
/**
* Execute actionPostupdate request with HTTP info returned
* @return ApiResponse<List<SaveResult>>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
*/
private ApiResponse> executeWithHttpInfo() throws ApiException {
return actionPostupdateWithHttpInfo(updateRequest, idempotencyKey, acceptEncoding, contentEncoding, authorization, rejectUnknownFields, zuoraEntityIds, zuoraTrackId, xZuoraWSDLVersion, zuoraVersion, zuoraOrgIds);
}
/**
* Execute actionPostupdate 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
*/
public okhttp3.Call executeAsync(final ApiCallback> _callback) throws ApiException {
return actionPostupdateAsync(updateRequest, idempotencyKey, acceptEncoding, contentEncoding, authorization, rejectUnknownFields, zuoraEntityIds, zuoraTrackId, xZuoraWSDLVersion, zuoraVersion, zuoraOrgIds, _callback);
}
}
/**
* Update
* Updates the information in one or more objects of the same type. You can specify different types of objects in different update calls, but each specific update call must apply to only one type of object. ### Limitations This call has the following limitations: * A maximum of 50 objects are supported in a single call. * The Invoice Settlement feature is not supported. This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. * The default WSDL version for Actions is 79. To update objects or fields according to a different WSDL version, set the `X-Zuora-WSDL-Version` header. To find out in which WSDL version a particular object or field was introduced, see [Zuora SOAP API Version History](https://knowledgecenter.zuora.com/DC_Developers/G_SOAP_API/Zuora_SOAP_API_Version_History). ### How to use this call? You can update an array of one or more zObjects. The fields you should specify can be found in the corresponding \"CRUD: Update an *zObject*\" operation. For example, to update one or multiple accounts, use the request fields in the [CRUD: Update an account](https://www.zuora.com/developer/api-references/older-api/operation/Object_PutAccount/) operation. It returns an array of SaveResults sorted in the same order, indicating the success or failure of updating each object. The following information applies to this call: * You cannot pass in null zObjects. * You can pass in a maximum of 50 zObjects at a time. * All objects must be of the same type. * For each field in each object, you must determine that object's ID. Then populate the fields that you want update with the new information. * Zuora ignores unrecognized fields in update calls. For example, if an optional field is spelled incorrectly or a field that does not exist is specified, Zuora ignores the field and continues to process the call. No error message is returned for unrecognized fields.
* @param updateRequest (required)
* @return ActionPostupdateApi
*/
public ActionPostupdateApi actionPostupdateApi(ProxyActionupdateRequest updateRequest) {
return new ActionPostupdateApi(updateRequest);
}
}