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.
/*
* Quickstart API Reference
* Zuora Quickstart API is the API that helps you achieve fundamental use cases.
* It provides a much simplified object model and improved performance, enabling developers to easily learn and use.
*/
package org.openapitools.client.api;
import org.openapitools.client.ApiCallback;
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.model.Headers;
import org.openapitools.client.model.ListQueryParams;
import org.openapitools.client.model.GetByIdQueryParams;
import org.openapitools.client.ApiResponse;
import org.openapitools.client.Configuration;
import org.openapitools.client.Pair;
import org.openapitools.client.ProgressRequestBody;
import org.openapitools.client.ProgressResponseBody;
import com.google.gson.reflect.TypeToken;
import java.io.IOException;
import java.math.BigDecimal;
import org.openapitools.client.model.CustomObject;
import org.openapitools.client.model.ErrorResponse;
import org.openapitools.client.model.ListCustomObjectResponse;
import org.openapitools.client.model.ErrorResponse;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class CustomObjectsApi {
private ApiClient localVarApiClient;
private int localHostIndex;
private String localCustomBaseUrl;
public CustomObjectsApi() {
this(Configuration.getDefaultApiClient());
}
public CustomObjectsApi(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 createCustomObjectCall(String customObjectType, Map requestBody, List fields, List customObjectCustomObjectTypeFields, List customObjectFields, List filter, Integer pageSize, List expand, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = requestBody;
// create path and map variables
String localVarPath = "/custom_objects/{custom_object_type}"
.replace("{" + "custom_object_type" + "}", localVarApiClient.escapeString(customObjectType.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (fields != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "fields[]", fields));
}
if (customObjectCustomObjectTypeFields != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "custom_object[custom_object_type].fields[]", customObjectCustomObjectTypeFields));
}
if (customObjectFields != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "custom_object.fields[]", customObjectFields));
}
if (filter != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter));
}
if (pageSize != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_size", pageSize));
}
if (expand != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand));
}
if (zuoraTrackId != null) {
localVarHeaderParams.put("zuora-track-id", localVarApiClient.parameterToString(zuoraTrackId));
}
if (async != null) {
localVarHeaderParams.put("async", localVarApiClient.parameterToString(async));
}
if (zuoraCacheEnabled != null) {
localVarHeaderParams.put("zuora-cache-enabled", localVarApiClient.parameterToString(zuoraCacheEnabled));
}
if (zuoraEntityIds != null) {
localVarHeaderParams.put("zuora-entity-ids", localVarApiClient.parameterToString(zuoraEntityIds));
}
if (idempotencyKey != null) {
localVarHeaderParams.put("idempotency-key", localVarApiClient.parameterToString(idempotencyKey));
}
if (acceptEncoding != null) {
localVarHeaderParams.put("accept-encoding", localVarApiClient.parameterToString(acceptEncoding));
}
if (contentEncoding != null) {
localVarHeaderParams.put("content-encoding", localVarApiClient.parameterToString(contentEncoding));
}
if (zuoraOrgIds != null) {
localVarHeaderParams.put("zuora-org-ids", localVarApiClient.parameterToString(zuoraOrgIds));
}
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "bearerAuth" };
return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call createCustomObjectValidateBeforeCall(String customObjectType, Map requestBody, List fields, List customObjectCustomObjectTypeFields, List customObjectFields, List filter, Integer pageSize, List expand, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'customObjectType' is set
if (customObjectType == null) {
throw new ApiException("Missing the required parameter 'customObjectType' when calling createCustomObject(Async)");
}
// verify the required parameter 'requestBody' is set
if (requestBody == null) {
throw new ApiException("Missing the required parameter 'requestBody' when calling createCustomObject(Async)");
}
return createCustomObjectCall(customObjectType, requestBody, fields, customObjectCustomObjectTypeFields, customObjectFields, filter, pageSize, expand, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback);
}
private ApiResponse createCustomObjectWithHttpInfo(String customObjectType, Map requestBody, List fields, List customObjectCustomObjectTypeFields, List customObjectFields, List filter, Integer pageSize, List expand, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds) throws ApiException {
okhttp3.Call localVarCall = createCustomObjectValidateBeforeCall(customObjectType, requestBody, fields, customObjectCustomObjectTypeFields, customObjectFields, filter, pageSize, expand, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, null);
try {
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
} catch (ApiException e) {
e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType()));
throw e;
}
}
private okhttp3.Call createCustomObjectAsync(String customObjectType, Map requestBody, List fields, List customObjectCustomObjectTypeFields, List customObjectFields, List filter, Integer pageSize, List expand, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = createCustomObjectValidateBeforeCall(customObjectType, requestBody, fields, customObjectCustomObjectTypeFields, customObjectFields, filter, pageSize, expand, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public static class CreateCustomObjectParams {
private final String customObjectType;
private final Map requestBody;
private Headers headers;
/*
* Check for list params
*/
private GetByIdQueryParams getByIdQueryParams;
private List fields;
private List customObjectCustomObjectTypeFields;
private List customObjectFields;
private List filter;
private Integer pageSize;
private List expand;
private String zuoraTrackId;
private Boolean async;
private Boolean zuoraCacheEnabled;
private String zuoraEntityIds;
private String idempotencyKey;
private String acceptEncoding;
private String contentEncoding;
private String zuoraOrgIds;
public CreateCustomObjectParams(String customObjectType, Map requestBody) {
this.customObjectType = customObjectType;
this.requestBody = requestBody;
}
/**
* Set getByIdQueryParams
* @param getByIdQueryParams GetByIdQueryParams
* @return CreateCustomObjectParams
*/
public CreateCustomObjectParams getByIdQueryParams(GetByIdQueryParams getByIdQueryParams) {
this.getByIdQueryParams = getByIdQueryParams;
if (filter != null) {
this.filter = getByIdQueryParams.getFilter();
}
if (pageSize != null) {
this.pageSize = getByIdQueryParams.getPageSize();
}
if (expand != null) {
this.expand = getByIdQueryParams.getExpand();
}
return this;
}
/**
* Set headers
* @param headers Headers
* @return CreateCustomObjectParams
*/
public CreateCustomObjectParams headers(Headers headers) {
this.headers = headers;
if (headers.getZuoraTrackId() != null) {
this.zuoraTrackId = headers.getZuoraTrackId();
}
if (headers.getAsync() != null) {
this.async = headers.getAsync();
}
if (headers.getZuoraCacheEnabled() != null) {
this.zuoraCacheEnabled = headers.getZuoraCacheEnabled();
}
if (headers.getZuoraEntityIds() != null) {
this.zuoraEntityIds = headers.getZuoraEntityIds();
}
if (headers.getIdempotencyKey() != null) {
this.idempotencyKey = headers.getIdempotencyKey();
}
if (headers.getAcceptEncoding() != null) {
this.acceptEncoding = headers.getAcceptEncoding();
}
if (headers.getContentEncoding() != null) {
this.contentEncoding = headers.getContentEncoding();
}
if (headers.getZuoraOrgIds() != null) {
this.zuoraOrgIds = headers.getZuoraOrgIds();
}
return this;
}
/**
* Set fields
* @param fields Allows you to specify which fields are returned in the response. Accepted `field` values will be those available in your tenant. (optional)
* @return CreateCustomObjectParams
*/
public CreateCustomObjectParams fields(List fields) {
this.fields = fields;
return this;
}
/**
* Set customObjectCustomObjectTypeFields
* @param customObjectCustomObjectTypeFields Allows you to specify which fields are returned in the response. Accepted `field` values and `custom_object_types` will be those available in your tenant. (optional)
* @return CreateCustomObjectParams
*/
public CreateCustomObjectParams customObjectCustomObjectTypeFields(List customObjectCustomObjectTypeFields) {
this.customObjectCustomObjectTypeFields = customObjectCustomObjectTypeFields;
return this;
}
/**
* Set customObjectFields
* @param customObjectFields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> </details> (optional)
* @return CreateCustomObjectParams
*/
public CreateCustomObjectParams customObjectFields(List customObjectFields) {
this.customObjectFields = customObjectFields;
return this;
}
/**
* Set filter
* @param filter A case-sensitive filter on the list. See the 'Filter lists' section of the [Quickstart API Tutorial](https://developer.zuora.com/quickstart-api/tutorial/overview/) for detailed instructions. (optional)
* @return CreateCustomObjectParams
*/
public CreateCustomObjectParams filter(List filter) {
this.filter = filter;
return this;
}
/**
* Set pageSize
* @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 99, Zuora will return a 400 error. (optional)
* @return CreateCustomObjectParams
*/
public CreateCustomObjectParams pageSize(Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* Set expand
* @param expand Allows you to expand responses by including related object information in a single call. See the [Expand responses](https://developer.zuora.com/quickstart-api/tutorial/expand-responses/) section of the Quickstart API Tutorials for detailed instructions. (optional)
* @return CreateCustomObjectParams
*/
public CreateCustomObjectParams expand(List expand) {
this.expand = expand;
return this;
}
}
/**
* Create a custom object
* Creates a new custom object.
* @param customObjectType Custom Object Definition Type (required)
* @param requestBody (required)
* @return CustomObject
* @http.response.details
Status Code
Description
Response Headers
201
Default Response
* ratelimit-limit - The request limit quota for the time window closest to exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information. * ratelimit-remaining - The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information. * ratelimit-reset - The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information. * zuora-request-id - Zuora’s internal identifier for this request. * zuora-track-id - A user-supplied identifier for this request. If you supply a `zuora-track-id` as a request header, Zuora returns the `zuora-track-id` as a response header.
400
Bad Request
-
401
Unauthorized
-
404
Not Found
-
405
Method Not Allowed
-
429
Too Many Requests
-
500
Internal Server Error
-
502
Bad Gateway
-
503
Service Unavailable
-
504
Gateway Timeout
-
*/
public CreateCustomObjectParams createCustomObjectParams(String customObjectType, Map requestBody) {
return new CreateCustomObjectParams(customObjectType, requestBody);
}
public CustomObject createCustomObject(String customObjectType, Map requestBody) throws ApiException {
CreateCustomObjectParams params = new CreateCustomObjectParams(customObjectType, requestBody);
return executeCreateCustomObjectAPICall(params).getData();
}
/**
* Expose HTTP info
public ApiResponse createCustomObjectWithHttpInfo(String customObjectType, Map requestBody) throws ApiException {
CreateCustomObjectParams params = new CreateCustomObjectParams(customObjectType, requestBody);
return executeCreateCustomObjectAPICall(params);
}
**/
/**
Legacy Query Params Requests
**/
public CustomObject createCustomObject( String customObjectType , Map requestBody , List expand) throws ApiException {
CreateCustomObjectParams params = new CreateCustomObjectParams(customObjectType, requestBody);
params.expand(expand);
return executeCreateCustomObjectAPICall(params).getData();
}
/*
* add header methods
*/
public CustomObject createCustomObject(String customObjectType , Map requestBody ,List expand,Headers headers) throws ApiException {
CreateCustomObjectParams params = new CreateCustomObjectParams(customObjectType, requestBody)
.expand(expand)
.headers(headers);
return executeCreateCustomObjectAPICall(params).getData();
}
/**
* Create a custom object
* Creates a new custom object.
* @param params CreateCustomObjectParams
* @return CustomObject
* @http.response.details
Status Code
Description
Response Headers
201
Default Response
* ratelimit-limit - The request limit quota for the time window closest to exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information. * ratelimit-remaining - The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information. * ratelimit-reset - The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information. * zuora-request-id - Zuora’s internal identifier for this request. * zuora-track-id - A user-supplied identifier for this request. If you supply a `zuora-track-id` as a request header, Zuora returns the `zuora-track-id` as a response header.
400
Bad Request
-
401
Unauthorized
-
404
Not Found
-
405
Method Not Allowed
-
429
Too Many Requests
-
500
Internal Server Error
-
502
Bad Gateway
-
503
Service Unavailable
-
504
Gateway Timeout
-
*/
public CustomObject create(CreateCustomObjectParams params) throws ApiException {
return executeCreateCustomObjectAPICall(params).getData();
}
public ApiResponse createWithHttpInfo(CreateCustomObjectParams params) throws ApiException {
return executeCreateCustomObjectAPICall(params);
}
ApiResponse executeCreateCustomObjectAPICall(CreateCustomObjectParams params) throws ApiException {
return createCustomObjectWithHttpInfo(params.customObjectType, params.requestBody, params.fields, params.customObjectCustomObjectTypeFields, params.customObjectFields, params.filter, params.pageSize, params.expand, params.zuoraTrackId, params.async, params.zuoraCacheEnabled, params.zuoraEntityIds, params.idempotencyKey, params.acceptEncoding, params.contentEncoding, params.zuoraOrgIds);
}
private okhttp3.Call deleteCustomObjectCall(String customObjectType, String customObjectId, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/custom_objects/{custom_object_type}/{custom_object_id}"
.replace("{" + "custom_object_type" + "}", localVarApiClient.escapeString(customObjectType.toString()))
.replace("{" + "custom_object_id" + "}", localVarApiClient.escapeString(customObjectId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (zuoraTrackId != null) {
localVarHeaderParams.put("zuora-track-id", localVarApiClient.parameterToString(zuoraTrackId));
}
if (async != null) {
localVarHeaderParams.put("async", localVarApiClient.parameterToString(async));
}
if (zuoraCacheEnabled != null) {
localVarHeaderParams.put("zuora-cache-enabled", localVarApiClient.parameterToString(zuoraCacheEnabled));
}
if (zuoraEntityIds != null) {
localVarHeaderParams.put("zuora-entity-ids", localVarApiClient.parameterToString(zuoraEntityIds));
}
if (idempotencyKey != null) {
localVarHeaderParams.put("idempotency-key", localVarApiClient.parameterToString(idempotencyKey));
}
if (acceptEncoding != null) {
localVarHeaderParams.put("accept-encoding", localVarApiClient.parameterToString(acceptEncoding));
}
if (contentEncoding != null) {
localVarHeaderParams.put("content-encoding", localVarApiClient.parameterToString(contentEncoding));
}
if (zuoraOrgIds != null) {
localVarHeaderParams.put("zuora-org-ids", localVarApiClient.parameterToString(zuoraOrgIds));
}
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "bearerAuth" };
return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call deleteCustomObjectValidateBeforeCall(String customObjectType, String customObjectId, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'customObjectType' is set
if (customObjectType == null) {
throw new ApiException("Missing the required parameter 'customObjectType' when calling deleteCustomObject(Async)");
}
// verify the required parameter 'customObjectId' is set
if (customObjectId == null) {
throw new ApiException("Missing the required parameter 'customObjectId' when calling deleteCustomObject(Async)");
}
return deleteCustomObjectCall(customObjectType, customObjectId, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback);
}
private ApiResponse deleteCustomObjectWithHttpInfo(String customObjectType, String customObjectId, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds) throws ApiException {
okhttp3.Call localVarCall = deleteCustomObjectValidateBeforeCall(customObjectType, customObjectId, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, null);
return localVarApiClient.execute(localVarCall);
}
private okhttp3.Call deleteCustomObjectAsync(String customObjectType, String customObjectId, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = deleteCustomObjectValidateBeforeCall(customObjectType, customObjectId, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback);
localVarApiClient.executeAsync(localVarCall, _callback);
return localVarCall;
}
public static class DeleteCustomObjectParams {
private final String customObjectType;
private final String customObjectId;
private Headers headers;
/*
* Check for list params
*/
private GetByIdQueryParams getByIdQueryParams;
private String zuoraTrackId;
private Boolean async;
private Boolean zuoraCacheEnabled;
private String zuoraEntityIds;
private String idempotencyKey;
private String acceptEncoding;
private String contentEncoding;
private String zuoraOrgIds;
public DeleteCustomObjectParams(String customObjectType, String customObjectId) {
this.customObjectType = customObjectType;
this.customObjectId = customObjectId;
}
/**
* Set headers
* @param headers Headers
* @return DeleteCustomObjectParams
*/
public DeleteCustomObjectParams headers(Headers headers) {
this.headers = headers;
if (headers.getZuoraTrackId() != null) {
this.zuoraTrackId = headers.getZuoraTrackId();
}
if (headers.getAsync() != null) {
this.async = headers.getAsync();
}
if (headers.getZuoraCacheEnabled() != null) {
this.zuoraCacheEnabled = headers.getZuoraCacheEnabled();
}
if (headers.getZuoraEntityIds() != null) {
this.zuoraEntityIds = headers.getZuoraEntityIds();
}
if (headers.getIdempotencyKey() != null) {
this.idempotencyKey = headers.getIdempotencyKey();
}
if (headers.getAcceptEncoding() != null) {
this.acceptEncoding = headers.getAcceptEncoding();
}
if (headers.getContentEncoding() != null) {
this.contentEncoding = headers.getContentEncoding();
}
if (headers.getZuoraOrgIds() != null) {
this.zuoraOrgIds = headers.getZuoraOrgIds();
}
return this;
}
}
/**
* Delete a custom object
* Permanently deletes a custom object. It cannot be undone.
* @param customObjectType Custom Object Definition Type (required)
* @param customObjectId Custom Object Id (required)
* @return
* @http.response.details
Status Code
Description
Response Headers
204
Default Response
* ratelimit-limit - The request limit quota for the time window closest to exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information. * ratelimit-remaining - The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information. * ratelimit-reset - The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information. * zuora-request-id - Zuora’s internal identifier for this request. * zuora-track-id - A user-supplied identifier for this request. If you supply a `zuora-track-id` as a request header, Zuora returns the `zuora-track-id` as a response header.
400
Bad Request
-
401
Unauthorized
-
404
Not Found
-
405
Method Not Allowed
-
429
Too Many Requests
-
500
Internal Server Error
-
502
Bad Gateway
-
503
Service Unavailable
-
504
Gateway Timeout
-
*/
public DeleteCustomObjectParams deleteCustomObjectParams(String customObjectType, String customObjectId) {
return new DeleteCustomObjectParams(customObjectType, customObjectId);
}
public void deleteCustomObject(String customObjectType, String customObjectId) throws ApiException {
DeleteCustomObjectParams params = new DeleteCustomObjectParams(customObjectType, customObjectId);
executeDeleteCustomObjectAPICall(params);
}
/**
* Expose HTTP info
public ApiResponse deleteCustomObjectWithHttpInfo(String customObjectType, String customObjectId) throws ApiException {
DeleteCustomObjectParams params = new DeleteCustomObjectParams(customObjectType, customObjectId);
return executeDeleteCustomObjectAPICall(params);
}
**/
/**
Legacy Query Params Requests
**/
/*
* add header methods
*/
public void deleteCustomObject(String customObjectType , String customObjectId ,Headers headers) throws ApiException {
DeleteCustomObjectParams params = new DeleteCustomObjectParams(customObjectType, customObjectId)
.headers(headers);
executeDeleteCustomObjectAPICall(params);
}
/**
* Delete a custom object
* Permanently deletes a custom object. It cannot be undone.
* @param params DeleteCustomObjectParams
* @return
* @http.response.details
Status Code
Description
Response Headers
204
Default Response
* ratelimit-limit - The request limit quota for the time window closest to exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information. * ratelimit-remaining - The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information. * ratelimit-reset - The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information. * zuora-request-id - Zuora’s internal identifier for this request. * zuora-track-id - A user-supplied identifier for this request. If you supply a `zuora-track-id` as a request header, Zuora returns the `zuora-track-id` as a response header.
400
Bad Request
-
401
Unauthorized
-
404
Not Found
-
405
Method Not Allowed
-
429
Too Many Requests
-
500
Internal Server Error
-
502
Bad Gateway
-
503
Service Unavailable
-
504
Gateway Timeout
-
*/
public void delete(DeleteCustomObjectParams params) throws ApiException {
executeDeleteCustomObjectAPICall(params).getData();
}
public ApiResponse deleteWithHttpInfo(DeleteCustomObjectParams params) throws ApiException {
return executeDeleteCustomObjectAPICall(params);
}
ApiResponse executeDeleteCustomObjectAPICall(DeleteCustomObjectParams params) throws ApiException {
return deleteCustomObjectWithHttpInfo(params.customObjectType, params.customObjectId, params.zuoraTrackId, params.async, params.zuoraCacheEnabled, params.zuoraEntityIds, params.idempotencyKey, params.acceptEncoding, params.contentEncoding, params.zuoraOrgIds);
}
private okhttp3.Call getCustomObjectCall(String customObjectType, String customObjectId, List fields, List customObjectCustomObjectTypeFields, List customObjectFields, List filter, Integer pageSize, List expand, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/custom_objects/{custom_object_type}/{custom_object_id}"
.replace("{" + "custom_object_type" + "}", localVarApiClient.escapeString(customObjectType.toString()))
.replace("{" + "custom_object_id" + "}", localVarApiClient.escapeString(customObjectId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (fields != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "fields[]", fields));
}
if (customObjectCustomObjectTypeFields != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "custom_object[custom_object_type].fields[]", customObjectCustomObjectTypeFields));
}
if (customObjectFields != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "custom_object.fields[]", customObjectFields));
}
if (filter != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter));
}
if (pageSize != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_size", pageSize));
}
if (expand != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand));
}
if (zuoraTrackId != null) {
localVarHeaderParams.put("zuora-track-id", localVarApiClient.parameterToString(zuoraTrackId));
}
if (async != null) {
localVarHeaderParams.put("async", localVarApiClient.parameterToString(async));
}
if (zuoraCacheEnabled != null) {
localVarHeaderParams.put("zuora-cache-enabled", localVarApiClient.parameterToString(zuoraCacheEnabled));
}
if (zuoraEntityIds != null) {
localVarHeaderParams.put("zuora-entity-ids", localVarApiClient.parameterToString(zuoraEntityIds));
}
if (idempotencyKey != null) {
localVarHeaderParams.put("idempotency-key", localVarApiClient.parameterToString(idempotencyKey));
}
if (acceptEncoding != null) {
localVarHeaderParams.put("accept-encoding", localVarApiClient.parameterToString(acceptEncoding));
}
if (contentEncoding != null) {
localVarHeaderParams.put("content-encoding", localVarApiClient.parameterToString(contentEncoding));
}
if (zuoraOrgIds != null) {
localVarHeaderParams.put("zuora-org-ids", localVarApiClient.parameterToString(zuoraOrgIds));
}
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "bearerAuth" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getCustomObjectValidateBeforeCall(String customObjectType, String customObjectId, List fields, List customObjectCustomObjectTypeFields, List customObjectFields, List filter, Integer pageSize, List expand, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'customObjectType' is set
if (customObjectType == null) {
throw new ApiException("Missing the required parameter 'customObjectType' when calling getCustomObject(Async)");
}
// verify the required parameter 'customObjectId' is set
if (customObjectId == null) {
throw new ApiException("Missing the required parameter 'customObjectId' when calling getCustomObject(Async)");
}
return getCustomObjectCall(customObjectType, customObjectId, fields, customObjectCustomObjectTypeFields, customObjectFields, filter, pageSize, expand, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback);
}
private ApiResponse getCustomObjectWithHttpInfo(String customObjectType, String customObjectId, List fields, List customObjectCustomObjectTypeFields, List customObjectFields, List filter, Integer pageSize, List expand, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds) throws ApiException {
okhttp3.Call localVarCall = getCustomObjectValidateBeforeCall(customObjectType, customObjectId, fields, customObjectCustomObjectTypeFields, customObjectFields, filter, pageSize, expand, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, null);
try {
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
} catch (ApiException e) {
e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType()));
throw e;
}
}
private okhttp3.Call getCustomObjectAsync(String customObjectType, String customObjectId, List fields, List customObjectCustomObjectTypeFields, List customObjectFields, List filter, Integer pageSize, List expand, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getCustomObjectValidateBeforeCall(customObjectType, customObjectId, fields, customObjectCustomObjectTypeFields, customObjectFields, filter, pageSize, expand, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public static class GetCustomObjectParams {
private final String customObjectType;
private final String customObjectId;
private Headers headers;
/*
* Check for list params
*/
private GetByIdQueryParams getByIdQueryParams;
private List fields;
private List customObjectCustomObjectTypeFields;
private List customObjectFields;
private List filter;
private Integer pageSize;
private List expand;
private String zuoraTrackId;
private Boolean async;
private Boolean zuoraCacheEnabled;
private String zuoraEntityIds;
private String idempotencyKey;
private String acceptEncoding;
private String contentEncoding;
private String zuoraOrgIds;
public GetCustomObjectParams(String customObjectType, String customObjectId) {
this.customObjectType = customObjectType;
this.customObjectId = customObjectId;
}
/**
* Set getByIdQueryParams
* @param getByIdQueryParams GetByIdQueryParams
* @return GetCustomObjectParams
*/
public GetCustomObjectParams getByIdQueryParams(GetByIdQueryParams getByIdQueryParams) {
this.getByIdQueryParams = getByIdQueryParams;
if (filter != null) {
this.filter = getByIdQueryParams.getFilter();
}
if (pageSize != null) {
this.pageSize = getByIdQueryParams.getPageSize();
}
if (expand != null) {
this.expand = getByIdQueryParams.getExpand();
}
return this;
}
/**
* Set headers
* @param headers Headers
* @return GetCustomObjectParams
*/
public GetCustomObjectParams headers(Headers headers) {
this.headers = headers;
if (headers.getZuoraTrackId() != null) {
this.zuoraTrackId = headers.getZuoraTrackId();
}
if (headers.getAsync() != null) {
this.async = headers.getAsync();
}
if (headers.getZuoraCacheEnabled() != null) {
this.zuoraCacheEnabled = headers.getZuoraCacheEnabled();
}
if (headers.getZuoraEntityIds() != null) {
this.zuoraEntityIds = headers.getZuoraEntityIds();
}
if (headers.getIdempotencyKey() != null) {
this.idempotencyKey = headers.getIdempotencyKey();
}
if (headers.getAcceptEncoding() != null) {
this.acceptEncoding = headers.getAcceptEncoding();
}
if (headers.getContentEncoding() != null) {
this.contentEncoding = headers.getContentEncoding();
}
if (headers.getZuoraOrgIds() != null) {
this.zuoraOrgIds = headers.getZuoraOrgIds();
}
return this;
}
/**
* Set fields
* @param fields Allows you to specify which fields are returned in the response. Accepted `field` values will be those available in your tenant. (optional)
* @return GetCustomObjectParams
*/
public GetCustomObjectParams fields(List fields) {
this.fields = fields;
return this;
}
/**
* Set customObjectCustomObjectTypeFields
* @param customObjectCustomObjectTypeFields Allows you to specify which fields are returned in the response. Accepted `field` values and `custom_object_types` will be those available in your tenant. (optional)
* @return GetCustomObjectParams
*/
public GetCustomObjectParams customObjectCustomObjectTypeFields(List customObjectCustomObjectTypeFields) {
this.customObjectCustomObjectTypeFields = customObjectCustomObjectTypeFields;
return this;
}
/**
* Set customObjectFields
* @param customObjectFields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> </details> (optional)
* @return GetCustomObjectParams
*/
public GetCustomObjectParams customObjectFields(List customObjectFields) {
this.customObjectFields = customObjectFields;
return this;
}
/**
* Set filter
* @param filter A case-sensitive filter on the list. See the 'Filter lists' section of the [Quickstart API Tutorial](https://developer.zuora.com/quickstart-api/tutorial/overview/) for detailed instructions. (optional)
* @return GetCustomObjectParams
*/
public GetCustomObjectParams filter(List filter) {
this.filter = filter;
return this;
}
/**
* Set pageSize
* @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 99, Zuora will return a 400 error. (optional)
* @return GetCustomObjectParams
*/
public GetCustomObjectParams pageSize(Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* Set expand
* @param expand Allows you to expand responses by including related object information in a single call. See the [Expand responses](https://developer.zuora.com/quickstart-api/tutorial/expand-responses/) section of the Quickstart API Tutorials for detailed instructions. (optional)
* @return GetCustomObjectParams
*/
public GetCustomObjectParams expand(List expand) {
this.expand = expand;
return this;
}
}
/**
* Retrieve a custom object
* Retrieves the custom object with the given ID.
* @param customObjectType Custom Object Definition Type (required)
* @param customObjectId Custom Object Id (required)
* @return CustomObject
* @http.response.details
Status Code
Description
Response Headers
200
Default Response
* ratelimit-limit - The request limit quota for the time window closest to exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information. * ratelimit-remaining - The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information. * ratelimit-reset - The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information. * zuora-request-id - Zuora’s internal identifier for this request. * zuora-track-id - A user-supplied identifier for this request. If you supply a `zuora-track-id` as a request header, Zuora returns the `zuora-track-id` as a response header.
400
Bad Request
-
401
Unauthorized
-
404
Not Found
-
405
Method Not Allowed
-
429
Too Many Requests
-
500
Internal Server Error
-
502
Bad Gateway
-
503
Service Unavailable
-
504
Gateway Timeout
-
*/
public GetCustomObjectParams getCustomObjectParams(String customObjectType, String customObjectId) {
return new GetCustomObjectParams(customObjectType, customObjectId);
}
public CustomObject getCustomObject(String customObjectType, String customObjectId) throws ApiException {
GetCustomObjectParams params = new GetCustomObjectParams(customObjectType, customObjectId);
return executeGetCustomObjectAPICall(params).getData();
}
/**
* Expose HTTP info
public ApiResponse getCustomObjectWithHttpInfo(String customObjectType, String customObjectId) throws ApiException {
GetCustomObjectParams params = new GetCustomObjectParams(customObjectType, customObjectId);
return executeGetCustomObjectAPICall(params);
}
**/
/**
Legacy Query Params Requests
**/
public CustomObject getCustomObject( String customObjectType , String customObjectId , List expand) throws ApiException {
GetCustomObjectParams params = new GetCustomObjectParams(customObjectType, customObjectId);
params.expand(expand);
return executeGetCustomObjectAPICall(params).getData();
}
/*
* add header methods
*/
public CustomObject getCustomObject(String customObjectType , String customObjectId ,List expand,Headers headers) throws ApiException {
GetCustomObjectParams params = new GetCustomObjectParams(customObjectType, customObjectId)
.expand(expand)
.headers(headers);
return executeGetCustomObjectAPICall(params).getData();
}
/**
* Retrieve a custom object
* Retrieves the custom object with the given ID.
* @param params GetCustomObjectParams
* @return CustomObject
* @http.response.details
Status Code
Description
Response Headers
200
Default Response
* ratelimit-limit - The request limit quota for the time window closest to exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information. * ratelimit-remaining - The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information. * ratelimit-reset - The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information. * zuora-request-id - Zuora’s internal identifier for this request. * zuora-track-id - A user-supplied identifier for this request. If you supply a `zuora-track-id` as a request header, Zuora returns the `zuora-track-id` as a response header.
400
Bad Request
-
401
Unauthorized
-
404
Not Found
-
405
Method Not Allowed
-
429
Too Many Requests
-
500
Internal Server Error
-
502
Bad Gateway
-
503
Service Unavailable
-
504
Gateway Timeout
-
*/
public CustomObject get(GetCustomObjectParams params) throws ApiException {
return executeGetCustomObjectAPICall(params).getData();
}
public ApiResponse getWithHttpInfo(GetCustomObjectParams params) throws ApiException {
return executeGetCustomObjectAPICall(params);
}
ApiResponse executeGetCustomObjectAPICall(GetCustomObjectParams params) throws ApiException {
return getCustomObjectWithHttpInfo(params.customObjectType, params.customObjectId, params.fields, params.customObjectCustomObjectTypeFields, params.customObjectFields, params.filter, params.pageSize, params.expand, params.zuoraTrackId, params.async, params.zuoraCacheEnabled, params.zuoraEntityIds, params.idempotencyKey, params.acceptEncoding, params.contentEncoding, params.zuoraOrgIds);
}
private okhttp3.Call getCustomObjectsCall(String customObjectType, Integer pageSize, List expand, String cursor, List filter, List sort, List fields, List customObjectCustomObjectTypeFields, List customObjectFields, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/custom_objects/{custom_object_type}"
.replace("{" + "custom_object_type" + "}", localVarApiClient.escapeString(customObjectType.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (pageSize != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_size", pageSize));
}
if (expand != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand));
}
if (cursor != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor));
}
if (filter != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter));
}
if (sort != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort));
}
if (fields != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "fields[]", fields));
}
if (customObjectCustomObjectTypeFields != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "custom_object[custom_object_type].fields[]", customObjectCustomObjectTypeFields));
}
if (customObjectFields != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "custom_object.fields[]", customObjectFields));
}
if (zuoraTrackId != null) {
localVarHeaderParams.put("zuora-track-id", localVarApiClient.parameterToString(zuoraTrackId));
}
if (async != null) {
localVarHeaderParams.put("async", localVarApiClient.parameterToString(async));
}
if (zuoraCacheEnabled != null) {
localVarHeaderParams.put("zuora-cache-enabled", localVarApiClient.parameterToString(zuoraCacheEnabled));
}
if (zuoraEntityIds != null) {
localVarHeaderParams.put("zuora-entity-ids", localVarApiClient.parameterToString(zuoraEntityIds));
}
if (idempotencyKey != null) {
localVarHeaderParams.put("idempotency-key", localVarApiClient.parameterToString(idempotencyKey));
}
if (acceptEncoding != null) {
localVarHeaderParams.put("accept-encoding", localVarApiClient.parameterToString(acceptEncoding));
}
if (contentEncoding != null) {
localVarHeaderParams.put("content-encoding", localVarApiClient.parameterToString(contentEncoding));
}
if (zuoraOrgIds != null) {
localVarHeaderParams.put("zuora-org-ids", localVarApiClient.parameterToString(zuoraOrgIds));
}
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "bearerAuth" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getCustomObjectsValidateBeforeCall(String customObjectType, Integer pageSize, List expand, String cursor, List filter, List sort, List fields, List customObjectCustomObjectTypeFields, List customObjectFields, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'customObjectType' is set
if (customObjectType == null) {
throw new ApiException("Missing the required parameter 'customObjectType' when calling getCustomObjects(Async)");
}
return getCustomObjectsCall(customObjectType, pageSize, expand, cursor, filter, sort, fields, customObjectCustomObjectTypeFields, customObjectFields, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback);
}
private ApiResponse getCustomObjectsWithHttpInfo(String customObjectType, Integer pageSize, List expand, String cursor, List filter, List sort, List fields, List customObjectCustomObjectTypeFields, List customObjectFields, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds) throws ApiException {
okhttp3.Call localVarCall = getCustomObjectsValidateBeforeCall(customObjectType, pageSize, expand, cursor, filter, sort, fields, customObjectCustomObjectTypeFields, customObjectFields, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, null);
try {
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
} catch (ApiException e) {
e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType()));
throw e;
}
}
private okhttp3.Call getCustomObjectsAsync(String customObjectType, Integer pageSize, List expand, String cursor, List filter, List sort, List fields, List customObjectCustomObjectTypeFields, List customObjectFields, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getCustomObjectsValidateBeforeCall(customObjectType, pageSize, expand, cursor, filter, sort, fields, customObjectCustomObjectTypeFields, customObjectFields, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public static class GetCustomObjectsParams {
private final String customObjectType;
private Headers headers;
/*
* Check for list params
*/
private ListQueryParams listQueryParams;
private Integer pageSize;
private List expand;
private String cursor;
private List filter;
private List sort;
private List fields;
private List customObjectCustomObjectTypeFields;
private List customObjectFields;
private String zuoraTrackId;
private Boolean async;
private Boolean zuoraCacheEnabled;
private String zuoraEntityIds;
private String idempotencyKey;
private String acceptEncoding;
private String contentEncoding;
private String zuoraOrgIds;
public GetCustomObjectsParams(String customObjectType) {
this.customObjectType = customObjectType;
}
/**
* Set listQueryParams
* @param listQueryParams ListQueryParams
* @return GetCustomObjectsParams
*/
public GetCustomObjectsParams listQueryParams(ListQueryParams listQueryParams) {
this.listQueryParams = listQueryParams;
if (pageSize != null) {
this.pageSize = listQueryParams.getPageSize();
}
if (expand != null) {
this.expand = listQueryParams.getExpand();
}
if (cursor != null) {
this.cursor = listQueryParams.getCursor();
}
if (filter != null) {
this.filter = listQueryParams.getFilter();
}
if (sort != null) {
this.sort = listQueryParams.getSort();
}
return this;
}
/**
* Set headers
* @param headers Headers
* @return GetCustomObjectsParams
*/
public GetCustomObjectsParams headers(Headers headers) {
this.headers = headers;
if (headers.getZuoraTrackId() != null) {
this.zuoraTrackId = headers.getZuoraTrackId();
}
if (headers.getAsync() != null) {
this.async = headers.getAsync();
}
if (headers.getZuoraCacheEnabled() != null) {
this.zuoraCacheEnabled = headers.getZuoraCacheEnabled();
}
if (headers.getZuoraEntityIds() != null) {
this.zuoraEntityIds = headers.getZuoraEntityIds();
}
if (headers.getIdempotencyKey() != null) {
this.idempotencyKey = headers.getIdempotencyKey();
}
if (headers.getAcceptEncoding() != null) {
this.acceptEncoding = headers.getAcceptEncoding();
}
if (headers.getContentEncoding() != null) {
this.contentEncoding = headers.getContentEncoding();
}
if (headers.getZuoraOrgIds() != null) {
this.zuoraOrgIds = headers.getZuoraOrgIds();
}
return this;
}
/**
* Set pageSize
* @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 99, Zuora will return a 400 error. (optional)
* @return GetCustomObjectsParams
*/
public GetCustomObjectsParams pageSize(Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* Set expand
* @param expand Allows you to expand responses by including related object information in a single call. See the [Expand responses](https://developer.zuora.com/quickstart-api/tutorial/expand-responses/) section of the Quickstart API Tutorials for detailed instructions. (optional)
* @return GetCustomObjectsParams
*/
public GetCustomObjectsParams expand(List expand) {
this.expand = expand;
return this;
}
/**
* Set cursor
* @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional)
* @return GetCustomObjectsParams
*/
public GetCustomObjectsParams cursor(String cursor) {
this.cursor = cursor;
return this;
}
/**
* Set filter
* @param filter A case-sensitive filter on the list. See the [Filter lists](https://developer.zuora.com/quickstart-api/tutorial/filter-lists/) section of the Quickstart API Tutorials for detailed instructions. (optional)
* @return GetCustomObjectsParams
*/
public GetCustomObjectsParams filter(List filter) {
this.filter = filter;
return this;
}
/**
* Set sort
* @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `account_number.asc`) or descending (e.g. `account_number.desc`). You cannot sort on properties that are arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional)
* @return GetCustomObjectsParams
*/
public GetCustomObjectsParams sort(List sort) {
this.sort = sort;
return this;
}
/**
* Set fields
* @param fields Allows you to specify which fields are returned in the response. Accepted `field` values will be those available in your tenant. (optional)
* @return GetCustomObjectsParams
*/
public GetCustomObjectsParams fields(List fields) {
this.fields = fields;
return this;
}
/**
* Set customObjectCustomObjectTypeFields
* @param customObjectCustomObjectTypeFields Allows you to specify which fields are returned in the response. Accepted `field` values and `custom_object_types` will be those available in your tenant. (optional)
* @return GetCustomObjectsParams
*/
public GetCustomObjectsParams customObjectCustomObjectTypeFields(List customObjectCustomObjectTypeFields) {
this.customObjectCustomObjectTypeFields = customObjectCustomObjectTypeFields;
return this;
}
/**
* Set customObjectFields
* @param customObjectFields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> </details> (optional)
* @return GetCustomObjectsParams
*/
public GetCustomObjectsParams customObjectFields(List customObjectFields) {
this.customObjectFields = customObjectFields;
return this;
}
}
/**
* List custom objects
* Returns a list of your custom objects.
* @param customObjectType Custom Object Definition Type (required)
* @return ListCustomObjectResponse
* @http.response.details
Status Code
Description
Response Headers
200
Default Response
* ratelimit-limit - The request limit quota for the time window closest to exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information. * ratelimit-remaining - The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information. * ratelimit-reset - The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information. * zuora-request-id - Zuora’s internal identifier for this request. * zuora-track-id - A user-supplied identifier for this request. If you supply a `zuora-track-id` as a request header, Zuora returns the `zuora-track-id` as a response header.
400
Bad Request
-
401
Unauthorized
-
404
Not Found
-
405
Method Not Allowed
-
429
Too Many Requests
-
500
Internal Server Error
-
502
Bad Gateway
-
503
Service Unavailable
-
504
Gateway Timeout
-
*/
public GetCustomObjectsParams getCustomObjectsParams(String customObjectType) {
return new GetCustomObjectsParams(customObjectType);
}
public ListCustomObjectResponse getCustomObjects(String customObjectType) throws ApiException {
GetCustomObjectsParams params = new GetCustomObjectsParams(customObjectType);
return executeGetCustomObjectsAPICall(params).getData();
}
/**
* Expose HTTP info
public ApiResponse getCustomObjectsWithHttpInfo(String customObjectType) throws ApiException {
GetCustomObjectsParams params = new GetCustomObjectsParams(customObjectType);
return executeGetCustomObjectsAPICall(params);
}
**/
/**
Legacy Query Params Requests
**/
public ListCustomObjectResponse getCustomObjects( String customObjectType , List expand, String cursor, List filter) throws ApiException {
GetCustomObjectsParams params = new GetCustomObjectsParams(customObjectType);
params.expand(expand);
params.cursor(cursor);
params.filter(filter);
return executeGetCustomObjectsAPICall(params).getData();
}
/*
* add header methods
*/
public ListCustomObjectResponse getCustomObjects(String customObjectType ,List expand,String cursor,List filter,Headers headers) throws ApiException {
GetCustomObjectsParams params = new GetCustomObjectsParams(customObjectType)
.expand(expand)
.cursor(cursor)
.filter(filter)
.headers(headers);
return executeGetCustomObjectsAPICall(params).getData();
}
/**
* List custom objects
* Returns a list of your custom objects.
* @param params GetCustomObjectsParams
* @return ListCustomObjectResponse
* @http.response.details
Status Code
Description
Response Headers
200
Default Response
* ratelimit-limit - The request limit quota for the time window closest to exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information. * ratelimit-remaining - The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information. * ratelimit-reset - The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information. * zuora-request-id - Zuora’s internal identifier for this request. * zuora-track-id - A user-supplied identifier for this request. If you supply a `zuora-track-id` as a request header, Zuora returns the `zuora-track-id` as a response header.
400
Bad Request
-
401
Unauthorized
-
404
Not Found
-
405
Method Not Allowed
-
429
Too Many Requests
-
500
Internal Server Error
-
502
Bad Gateway
-
503
Service Unavailable
-
504
Gateway Timeout
-
*/
public ListCustomObjectResponse list(GetCustomObjectsParams params) throws ApiException {
return executeGetCustomObjectsAPICall(params).getData();
}
public ApiResponse listWithHttpInfo(GetCustomObjectsParams params) throws ApiException {
return executeGetCustomObjectsAPICall(params);
}
ApiResponse executeGetCustomObjectsAPICall(GetCustomObjectsParams params) throws ApiException {
return getCustomObjectsWithHttpInfo(params.customObjectType, params.pageSize, params.expand, params.cursor, params.filter, params.sort, params.fields, params.customObjectCustomObjectTypeFields, params.customObjectFields, params.zuoraTrackId, params.async, params.zuoraCacheEnabled, params.zuoraEntityIds, params.idempotencyKey, params.acceptEncoding, params.contentEncoding, params.zuoraOrgIds);
}
private okhttp3.Call updateCustomObjectCall(String customObjectType, String customObjectId, Map requestBody, List fields, List customObjectCustomObjectTypeFields, List customObjectFields, List filter, Integer pageSize, List expand, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = requestBody;
// create path and map variables
String localVarPath = "/custom_objects/{custom_object_type}/{custom_object_id}"
.replace("{" + "custom_object_type" + "}", localVarApiClient.escapeString(customObjectType.toString()))
.replace("{" + "custom_object_id" + "}", localVarApiClient.escapeString(customObjectId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (fields != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "fields[]", fields));
}
if (customObjectCustomObjectTypeFields != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "custom_object[custom_object_type].fields[]", customObjectCustomObjectTypeFields));
}
if (customObjectFields != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "custom_object.fields[]", customObjectFields));
}
if (filter != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter));
}
if (pageSize != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_size", pageSize));
}
if (expand != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand));
}
if (zuoraTrackId != null) {
localVarHeaderParams.put("zuora-track-id", localVarApiClient.parameterToString(zuoraTrackId));
}
if (async != null) {
localVarHeaderParams.put("async", localVarApiClient.parameterToString(async));
}
if (zuoraCacheEnabled != null) {
localVarHeaderParams.put("zuora-cache-enabled", localVarApiClient.parameterToString(zuoraCacheEnabled));
}
if (zuoraEntityIds != null) {
localVarHeaderParams.put("zuora-entity-ids", localVarApiClient.parameterToString(zuoraEntityIds));
}
if (idempotencyKey != null) {
localVarHeaderParams.put("idempotency-key", localVarApiClient.parameterToString(idempotencyKey));
}
if (acceptEncoding != null) {
localVarHeaderParams.put("accept-encoding", localVarApiClient.parameterToString(acceptEncoding));
}
if (contentEncoding != null) {
localVarHeaderParams.put("content-encoding", localVarApiClient.parameterToString(contentEncoding));
}
if (zuoraOrgIds != null) {
localVarHeaderParams.put("zuora-org-ids", localVarApiClient.parameterToString(zuoraOrgIds));
}
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "bearerAuth" };
return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call updateCustomObjectValidateBeforeCall(String customObjectType, String customObjectId, Map requestBody, List fields, List customObjectCustomObjectTypeFields, List customObjectFields, List filter, Integer pageSize, List expand, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'customObjectType' is set
if (customObjectType == null) {
throw new ApiException("Missing the required parameter 'customObjectType' when calling updateCustomObject(Async)");
}
// verify the required parameter 'customObjectId' is set
if (customObjectId == null) {
throw new ApiException("Missing the required parameter 'customObjectId' when calling updateCustomObject(Async)");
}
// verify the required parameter 'requestBody' is set
if (requestBody == null) {
throw new ApiException("Missing the required parameter 'requestBody' when calling updateCustomObject(Async)");
}
return updateCustomObjectCall(customObjectType, customObjectId, requestBody, fields, customObjectCustomObjectTypeFields, customObjectFields, filter, pageSize, expand, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback);
}
private ApiResponse updateCustomObjectWithHttpInfo(String customObjectType, String customObjectId, Map requestBody, List fields, List customObjectCustomObjectTypeFields, List customObjectFields, List filter, Integer pageSize, List expand, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds) throws ApiException {
okhttp3.Call localVarCall = updateCustomObjectValidateBeforeCall(customObjectType, customObjectId, requestBody, fields, customObjectCustomObjectTypeFields, customObjectFields, filter, pageSize, expand, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, null);
try {
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
} catch (ApiException e) {
e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType()));
throw e;
}
}
private okhttp3.Call updateCustomObjectAsync(String customObjectType, String customObjectId, Map requestBody, List fields, List customObjectCustomObjectTypeFields, List customObjectFields, List filter, Integer pageSize, List expand, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = updateCustomObjectValidateBeforeCall(customObjectType, customObjectId, requestBody, fields, customObjectCustomObjectTypeFields, customObjectFields, filter, pageSize, expand, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public static class UpdateCustomObjectParams {
private final String customObjectType;
private final String customObjectId;
private final Map requestBody;
private Headers headers;
/*
* Check for list params
*/
private GetByIdQueryParams getByIdQueryParams;
private List fields;
private List customObjectCustomObjectTypeFields;
private List customObjectFields;
private List filter;
private Integer pageSize;
private List expand;
private String zuoraTrackId;
private Boolean async;
private Boolean zuoraCacheEnabled;
private String zuoraEntityIds;
private String idempotencyKey;
private String acceptEncoding;
private String contentEncoding;
private String zuoraOrgIds;
public UpdateCustomObjectParams(String customObjectType, String customObjectId, Map requestBody) {
this.customObjectType = customObjectType;
this.customObjectId = customObjectId;
this.requestBody = requestBody;
}
/**
* Set getByIdQueryParams
* @param getByIdQueryParams GetByIdQueryParams
* @return UpdateCustomObjectParams
*/
public UpdateCustomObjectParams getByIdQueryParams(GetByIdQueryParams getByIdQueryParams) {
this.getByIdQueryParams = getByIdQueryParams;
if (filter != null) {
this.filter = getByIdQueryParams.getFilter();
}
if (pageSize != null) {
this.pageSize = getByIdQueryParams.getPageSize();
}
if (expand != null) {
this.expand = getByIdQueryParams.getExpand();
}
return this;
}
/**
* Set headers
* @param headers Headers
* @return UpdateCustomObjectParams
*/
public UpdateCustomObjectParams headers(Headers headers) {
this.headers = headers;
if (headers.getZuoraTrackId() != null) {
this.zuoraTrackId = headers.getZuoraTrackId();
}
if (headers.getAsync() != null) {
this.async = headers.getAsync();
}
if (headers.getZuoraCacheEnabled() != null) {
this.zuoraCacheEnabled = headers.getZuoraCacheEnabled();
}
if (headers.getZuoraEntityIds() != null) {
this.zuoraEntityIds = headers.getZuoraEntityIds();
}
if (headers.getIdempotencyKey() != null) {
this.idempotencyKey = headers.getIdempotencyKey();
}
if (headers.getAcceptEncoding() != null) {
this.acceptEncoding = headers.getAcceptEncoding();
}
if (headers.getContentEncoding() != null) {
this.contentEncoding = headers.getContentEncoding();
}
if (headers.getZuoraOrgIds() != null) {
this.zuoraOrgIds = headers.getZuoraOrgIds();
}
return this;
}
/**
* Set fields
* @param fields Allows you to specify which fields are returned in the response. Accepted `field` values will be those available in your tenant. (optional)
* @return UpdateCustomObjectParams
*/
public UpdateCustomObjectParams fields(List fields) {
this.fields = fields;
return this;
}
/**
* Set customObjectCustomObjectTypeFields
* @param customObjectCustomObjectTypeFields Allows you to specify which fields are returned in the response. Accepted `field` values and `custom_object_types` will be those available in your tenant. (optional)
* @return UpdateCustomObjectParams
*/
public UpdateCustomObjectParams customObjectCustomObjectTypeFields(List customObjectCustomObjectTypeFields) {
this.customObjectCustomObjectTypeFields = customObjectCustomObjectTypeFields;
return this;
}
/**
* Set customObjectFields
* @param customObjectFields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> </details> (optional)
* @return UpdateCustomObjectParams
*/
public UpdateCustomObjectParams customObjectFields(List customObjectFields) {
this.customObjectFields = customObjectFields;
return this;
}
/**
* Set filter
* @param filter A case-sensitive filter on the list. See the 'Filter lists' section of the [Quickstart API Tutorial](https://developer.zuora.com/quickstart-api/tutorial/overview/) for detailed instructions. (optional)
* @return UpdateCustomObjectParams
*/
public UpdateCustomObjectParams filter(List filter) {
this.filter = filter;
return this;
}
/**
* Set pageSize
* @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 99, Zuora will return a 400 error. (optional)
* @return UpdateCustomObjectParams
*/
public UpdateCustomObjectParams pageSize(Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* Set expand
* @param expand Allows you to expand responses by including related object information in a single call. See the [Expand responses](https://developer.zuora.com/quickstart-api/tutorial/expand-responses/) section of the Quickstart API Tutorials for detailed instructions. (optional)
* @return UpdateCustomObjectParams
*/
public UpdateCustomObjectParams expand(List expand) {
this.expand = expand;
return this;
}
}
/**
* Update a custom object
* Updates the specified custom object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
* @param customObjectType Custom Object Definition Type (required)
* @param customObjectId Custom Object Id (required)
* @param requestBody (required)
* @return CustomObject
* @http.response.details
Status Code
Description
Response Headers
200
Default Response
* ratelimit-limit - The request limit quota for the time window closest to exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information. * ratelimit-remaining - The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information. * ratelimit-reset - The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information. * zuora-request-id - Zuora’s internal identifier for this request. * zuora-track-id - A user-supplied identifier for this request. If you supply a `zuora-track-id` as a request header, Zuora returns the `zuora-track-id` as a response header.
400
Bad Request
-
401
Unauthorized
-
404
Not Found
-
405
Method Not Allowed
-
429
Too Many Requests
-
500
Internal Server Error
-
502
Bad Gateway
-
503
Service Unavailable
-
504
Gateway Timeout
-
*/
public UpdateCustomObjectParams updateCustomObjectParams(String customObjectType, String customObjectId, Map requestBody) {
return new UpdateCustomObjectParams(customObjectType, customObjectId, requestBody);
}
public CustomObject updateCustomObject(String customObjectType, String customObjectId, Map requestBody) throws ApiException {
UpdateCustomObjectParams params = new UpdateCustomObjectParams(customObjectType, customObjectId, requestBody);
return executeUpdateCustomObjectAPICall(params).getData();
}
/**
* Expose HTTP info
public ApiResponse updateCustomObjectWithHttpInfo(String customObjectType, String customObjectId, Map requestBody) throws ApiException {
UpdateCustomObjectParams params = new UpdateCustomObjectParams(customObjectType, customObjectId, requestBody);
return executeUpdateCustomObjectAPICall(params);
}
**/
/**
Legacy Query Params Requests
**/
public CustomObject updateCustomObject( String customObjectType , String customObjectId , Map requestBody , List expand) throws ApiException {
UpdateCustomObjectParams params = new UpdateCustomObjectParams(customObjectType, customObjectId, requestBody);
params.expand(expand);
return executeUpdateCustomObjectAPICall(params).getData();
}
/*
* add header methods
*/
public CustomObject updateCustomObject(String customObjectType , String customObjectId , Map requestBody ,List expand,Headers headers) throws ApiException {
UpdateCustomObjectParams params = new UpdateCustomObjectParams(customObjectType, customObjectId, requestBody)
.expand(expand)
.headers(headers);
return executeUpdateCustomObjectAPICall(params).getData();
}
/**
* Update a custom object
* Updates the specified custom object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
* @param params UpdateCustomObjectParams
* @return CustomObject
* @http.response.details
Status Code
Description
Response Headers
200
Default Response
* ratelimit-limit - The request limit quota for the time window closest to exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information. * ratelimit-remaining - The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information. * ratelimit-reset - The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information. * zuora-request-id - Zuora’s internal identifier for this request. * zuora-track-id - A user-supplied identifier for this request. If you supply a `zuora-track-id` as a request header, Zuora returns the `zuora-track-id` as a response header.