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.ErrorResponse;
import org.openapitools.client.model.Order;
import org.openapitools.client.model.OrderCancelResponse;
import org.openapitools.client.model.OrderCancellationRequest;
import org.openapitools.client.model.OrderCreateRequest;
import org.openapitools.client.model.OrderListResponse;
import org.openapitools.client.model.OrderPreviewCreateRequest;
import org.openapitools.client.model.OrderPreviewResponse;
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 OrdersApi {
private ApiClient localVarApiClient;
private int localHostIndex;
private String localCustomBaseUrl;
public OrdersApi() {
this(Configuration.getDefaultApiClient());
}
public OrdersApi(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 activateOrderCall(String orderId, List fields, List orderFields, List orderActionsFields, List subscriptionsFields, List lineItemsFields, List subscriptionPlansFields, List subscriptionItemsFields, List invoiceItemsFields, List expand, List filter, Integer pageSize, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/orders/{order_id}/activate"
.replace("{" + "order_id" + "}", localVarApiClient.escapeString(orderId.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 (orderFields != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "order.fields[]", orderFields));
}
if (orderActionsFields != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "order_actions.fields[]", orderActionsFields));
}
if (subscriptionsFields != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "subscriptions.fields[]", subscriptionsFields));
}
if (lineItemsFields != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "line_items.fields[]", lineItemsFields));
}
if (subscriptionPlansFields != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "subscription_plans.fields[]", subscriptionPlansFields));
}
if (subscriptionItemsFields != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "subscription_items.fields[]", subscriptionItemsFields));
}
if (invoiceItemsFields != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "invoice_items.fields[]", invoiceItemsFields));
}
if (expand != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand));
}
if (filter != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter));
}
if (pageSize != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_size", pageSize));
}
if (zuoraTrackId != null) {
localVarHeaderParams.put("zuora-track-id", localVarApiClient.parameterToString(zuoraTrackId));
}
if (async != null) {
localVarHeaderParams.put("async", localVarApiClient.parameterToString(async));
}
if (zuoraCacheEnabled != null) {
localVarHeaderParams.put("zuora-cache-enabled", localVarApiClient.parameterToString(zuoraCacheEnabled));
}
if (zuoraEntityIds != null) {
localVarHeaderParams.put("zuora-entity-ids", localVarApiClient.parameterToString(zuoraEntityIds));
}
if (idempotencyKey != null) {
localVarHeaderParams.put("idempotency-key", localVarApiClient.parameterToString(idempotencyKey));
}
if (acceptEncoding != null) {
localVarHeaderParams.put("accept-encoding", localVarApiClient.parameterToString(acceptEncoding));
}
if (contentEncoding != null) {
localVarHeaderParams.put("content-encoding", localVarApiClient.parameterToString(contentEncoding));
}
if (zuoraOrgIds != null) {
localVarHeaderParams.put("zuora-org-ids", localVarApiClient.parameterToString(zuoraOrgIds));
}
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "bearerAuth" };
return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call activateOrderValidateBeforeCall(String orderId, List fields, List orderFields, List orderActionsFields, List subscriptionsFields, List lineItemsFields, List subscriptionPlansFields, List subscriptionItemsFields, List invoiceItemsFields, List expand, List filter, Integer pageSize, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'orderId' is set
if (orderId == null) {
throw new ApiException("Missing the required parameter 'orderId' when calling activateOrder(Async)");
}
return activateOrderCall(orderId, fields, orderFields, orderActionsFields, subscriptionsFields, lineItemsFields, subscriptionPlansFields, subscriptionItemsFields, invoiceItemsFields, expand, filter, pageSize, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback);
}
private ApiResponse activateOrderWithHttpInfo(String orderId, List fields, List orderFields, List orderActionsFields, List subscriptionsFields, List lineItemsFields, List subscriptionPlansFields, List subscriptionItemsFields, List invoiceItemsFields, List expand, List filter, Integer pageSize, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds) throws ApiException {
okhttp3.Call localVarCall = activateOrderValidateBeforeCall(orderId, fields, orderFields, orderActionsFields, subscriptionsFields, lineItemsFields, subscriptionPlansFields, subscriptionItemsFields, invoiceItemsFields, expand, filter, pageSize, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, null);
try {
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
} catch (ApiException e) {
e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType()));
throw e;
}
}
private okhttp3.Call activateOrderAsync(String orderId, List fields, List orderFields, List orderActionsFields, List subscriptionsFields, List lineItemsFields, List subscriptionPlansFields, List subscriptionItemsFields, List invoiceItemsFields, List expand, List filter, Integer pageSize, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = activateOrderValidateBeforeCall(orderId, fields, orderFields, orderActionsFields, subscriptionsFields, lineItemsFields, subscriptionPlansFields, subscriptionItemsFields, invoiceItemsFields, expand, filter, pageSize, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public static class ActivateOrderParams {
private final String orderId;
private Headers headers;
/*
* Check for list params
*/
private GetByIdQueryParams getByIdQueryParams;
private List fields;
private List orderFields;
private List orderActionsFields;
private List subscriptionsFields;
private List lineItemsFields;
private List subscriptionPlansFields;
private List subscriptionItemsFields;
private List invoiceItemsFields;
private List expand;
private List filter;
private Integer pageSize;
private String zuoraTrackId;
private Boolean async;
private Boolean zuoraCacheEnabled;
private String zuoraEntityIds;
private String idempotencyKey;
private String acceptEncoding;
private String contentEncoding;
private String zuoraOrgIds;
public ActivateOrderParams(String orderId) {
this.orderId = orderId;
}
/**
* Set getByIdQueryParams
* @param getByIdQueryParams GetByIdQueryParams
* @return ActivateOrderParams
*/
public ActivateOrderParams getByIdQueryParams(GetByIdQueryParams getByIdQueryParams) {
this.getByIdQueryParams = getByIdQueryParams;
if (expand != null) {
this.expand = getByIdQueryParams.getExpand();
}
if (filter != null) {
this.filter = getByIdQueryParams.getFilter();
}
if (pageSize != null) {
this.pageSize = getByIdQueryParams.getPageSize();
}
return this;
}
/**
* Set headers
* @param headers Headers
* @return ActivateOrderParams
*/
public ActivateOrderParams headers(Headers headers) {
this.headers = headers;
if (headers.getZuoraTrackId() != null) {
this.zuoraTrackId = headers.getZuoraTrackId();
}
if (headers.getAsync() != null) {
this.async = headers.getAsync();
}
if (headers.getZuoraCacheEnabled() != null) {
this.zuoraCacheEnabled = headers.getZuoraCacheEnabled();
}
if (headers.getZuoraEntityIds() != null) {
this.zuoraEntityIds = headers.getZuoraEntityIds();
}
if (headers.getIdempotencyKey() != null) {
this.idempotencyKey = headers.getIdempotencyKey();
}
if (headers.getAcceptEncoding() != null) {
this.acceptEncoding = headers.getAcceptEncoding();
}
if (headers.getContentEncoding() != null) {
this.contentEncoding = headers.getContentEncoding();
}
if (headers.getZuoraOrgIds() != null) {
this.zuoraOrgIds = headers.getZuoraOrgIds();
}
return this;
}
/**
* Set fields
* @param fields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `account_id`, `order_number`, `order_date`, `state`, `category`, `description`, `scheduled_date`, `scheduled_date_policy`, `line_items`, `subscriptions` </details> (optional)
* @return ActivateOrderParams
*/
public ActivateOrderParams fields(List fields) {
this.fields = fields;
return this;
}
/**
* Set orderFields
* @param orderFields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `account_id`, `order_number`, `order_date`, `state`, `category`, `description`, `scheduled_date`, `scheduled_date_policy`, `line_items`, `subscriptions` </details> (optional)
* @return ActivateOrderParams
*/
public ActivateOrderParams orderFields(List orderFields) {
this.orderFields = orderFields;
return this;
}
/**
* Set orderActionsFields
* @param orderActionsFields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `type`, `action_id`, `sequence`, `start_on`, `subscription_plans`, `renew`, `terms`, `cancel`, `pause`, `resume`, `order` </details> (optional)
* @return ActivateOrderParams
*/
public ActivateOrderParams orderActionsFields(List orderActionsFields) {
this.orderActionsFields = orderActionsFields;
return this;
}
/**
* Set subscriptionsFields
* @param subscriptionsFields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `subscription_number`, `state`, `account_id`, `invoice_owner_account_id`, `auto_renew`, `version`, `initial_term`, `current_term`, `renewal_term`, `start_date`, `end_date`, `description`, `contract_effective`, `service_activation`, `customer_acceptance`, `invoice_separately`, `latest_version`, `payment_terms`, `billing_document_settings`, `bill_to_id`, `sold_to_id`, `contracted_mrr`, `currency`, `cancel_reason`, `last_booking_date`, `actions` </details> (optional)
* @return ActivateOrderParams
*/
public ActivateOrderParams subscriptionsFields(List subscriptionsFields) {
this.subscriptionsFields = subscriptionsFields;
return this;
}
/**
* Set lineItemsFields
* @param lineItemsFields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `total`, `subtotal`, `quantity_fulfilled`, `quantity_pending_fulfillment`, `unit_of_measure`, `accounting_code`, `adjustment_liability_account`, `unit_amount`, `target_date`, `billing_rule`, `contract_asset_account`, `contract_liability_account`, `description`, `discount_total`, `revenue`, `discount_unit_amount`, `discount_percent`, `category`, `name`, `item_number`, `type`, `list_price`, `list_unit_price`, `original_order_date`, `original_order_id`, `original_order_line_item_id`, `original_order_line_item_number`, `original_order_number`, `product_code`, `price_id`, `purchase_order_number`, `quantity`, `quantity_available_for_return`, `related_subscription_number`, `requires_fulfillment`, `sold_to_id`, `original_sold_to_id`, `tax_code`, `tax_inclusive`, `end_date`, `start_date`, `unbilled_receivables_account`, `state`, `order_id` </details> (optional)
* @return ActivateOrderParams
*/
public ActivateOrderParams lineItemsFields(List lineItemsFields) {
this.lineItemsFields = lineItemsFields;
return this;
}
/**
* Set subscriptionPlansFields
* @param subscriptionPlansFields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `name`, `plan_id`, `subscription_id`, `product_id`, `subscription_plan_number`, `subscription_items` </details> (optional)
* @return ActivateOrderParams
*/
public ActivateOrderParams subscriptionPlansFields(List subscriptionPlansFields) {
this.subscriptionPlansFields = subscriptionPlansFields;
return this;
}
/**
* Set subscriptionItemsFields
* @param subscriptionItemsFields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `start_date`, `end_date`, `charge_model`, `charge_type`, `tiers`, `subscription_item_number`, `name`, `description`, `charged_through_date`, `recurring`, `price_id`, `start_event`, `tax_code`, `tax_inclusive`, `unit_of_measure`, `quantity`, `price_base_interval`, `overage`, `subscription_plan_id`, `tiers_mode`, `processed_through_date`, `active`, `state`, `unit_amount`, `amount`, `discount_amount`, `discount_percent`, `price_change_percentage`, `price_change_option` </details> (optional)
* @return ActivateOrderParams
*/
public ActivateOrderParams subscriptionItemsFields(List subscriptionItemsFields) {
this.subscriptionItemsFields = subscriptionItemsFields;
return this;
}
/**
* Set invoiceItemsFields
* @param invoiceItemsFields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `amount`, `booking_reference`, `applied_to_item_id`, `price_id`, `discount_item`, `deferred_revenue_account`, `description`, `invoice_id`, `sku`, `name`, `purchase_order_number`, `quantity`, `recognized_revenue_account`, `remaining_balance`, `revenue_recognition_rule_name`, `accounting_code`, `service_end`, `service_start`, `accounts_receivable_account`, `subscription_id`, `subscription_item_id`, `tax`, `tax_code`, `tax_inclusive`, `unit_amount`, `unit_of_measure`, `document_item_date` </details> (optional)
* @return ActivateOrderParams
*/
public ActivateOrderParams invoiceItemsFields(List invoiceItemsFields) {
this.invoiceItemsFields = invoiceItemsFields;
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 ActivateOrderParams
*/
public ActivateOrderParams expand(List expand) {
this.expand = expand;
return this;
}
/**
* Set filter
* @param filter A case-sensitive filter on the list. See the [Filter lists](https://developer.zuora.com/quickstart-api/tutorial/filter-lists/) section of the Quickstart API Tutorial for detailed instructions. Note that the filters on this operation are only applicable to the related objects. For example, when you are calling the \"Retrieve a billing document\" operation, you can use the `filter[]` parameter on the related objects such as `filter[]=items[account_id].EQ:8ad09e208858b5cf0188595208151c63` (optional)
* @return ActivateOrderParams
*/
public ActivateOrderParams 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 ActivateOrderParams
*/
public ActivateOrderParams pageSize(Integer pageSize) {
this.pageSize = pageSize;
return this;
}
}
/**
* Activate an order
* Activates a draft order.
* @param orderId Identifier for the order, either `order_number` or `order_id` (required)
* @return Order
* @http.response.details
Status Code
Description
Response Headers
200
Default Response
-
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 ActivateOrderParams activateOrderParams(String orderId) {
return new ActivateOrderParams(orderId);
}
public Order activateOrder(String orderId) throws ApiException {
ActivateOrderParams params = new ActivateOrderParams(orderId);
return executeActivateOrderAPICall(params).getData();
}
/**
* Expose HTTP info
public ApiResponse activateOrderWithHttpInfo(String orderId) throws ApiException {
ActivateOrderParams params = new ActivateOrderParams(orderId);
return executeActivateOrderAPICall(params);
}
**/
/**
Legacy Query Params Requests
**/
public Order activateOrder( String orderId , List expand) throws ApiException {
ActivateOrderParams params = new ActivateOrderParams(orderId);
params.expand(expand);
return executeActivateOrderAPICall(params).getData();
}
/*
* add header methods
*/
public Order activateOrder(String orderId ,List expand,Headers headers) throws ApiException {
ActivateOrderParams params = new ActivateOrderParams(orderId)
.expand(expand)
.headers(headers);
return executeActivateOrderAPICall(params).getData();
}
/**
* Activate an order
* Activates a draft order.
* @param params ActivateOrderParams
* @return Order
* @http.response.details
Status Code
Description
Response Headers
200
Default Response
-
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 Order activateOrder(ActivateOrderParams params) throws ApiException {
return executeActivateOrderAPICall(params).getData();
}
public ApiResponse activateOrderWithHttpInfo(ActivateOrderParams params) throws ApiException {
return executeActivateOrderAPICall(params);
}
ApiResponse executeActivateOrderAPICall(ActivateOrderParams params) throws ApiException {
return activateOrderWithHttpInfo(params.orderId, params.fields, params.orderFields, params.orderActionsFields, params.subscriptionsFields, params.lineItemsFields, params.subscriptionPlansFields, params.subscriptionItemsFields, params.invoiceItemsFields, params.expand, params.filter, params.pageSize, params.zuoraTrackId, params.async, params.zuoraCacheEnabled, params.zuoraEntityIds, params.idempotencyKey, params.acceptEncoding, params.contentEncoding, params.zuoraOrgIds);
}
private okhttp3.Call cancelOrderCall(String orderId, OrderCancellationRequest orderCancellationRequest, List fields, List orderFields, List orderActionsFields, List subscriptionsFields, List lineItemsFields, List subscriptionPlansFields, List subscriptionItemsFields, List invoiceItemsFields, List expand, List filter, Integer pageSize, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = orderCancellationRequest;
// create path and map variables
String localVarPath = "/orders/{order_id}/cancel"
.replace("{" + "order_id" + "}", localVarApiClient.escapeString(orderId.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 (orderFields != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "order.fields[]", orderFields));
}
if (orderActionsFields != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "order_actions.fields[]", orderActionsFields));
}
if (subscriptionsFields != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "subscriptions.fields[]", subscriptionsFields));
}
if (lineItemsFields != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "line_items.fields[]", lineItemsFields));
}
if (subscriptionPlansFields != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "subscription_plans.fields[]", subscriptionPlansFields));
}
if (subscriptionItemsFields != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "subscription_items.fields[]", subscriptionItemsFields));
}
if (invoiceItemsFields != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "invoice_items.fields[]", invoiceItemsFields));
}
if (expand != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand));
}
if (filter != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter));
}
if (pageSize != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_size", pageSize));
}
if (zuoraTrackId != null) {
localVarHeaderParams.put("zuora-track-id", localVarApiClient.parameterToString(zuoraTrackId));
}
if (async != null) {
localVarHeaderParams.put("async", localVarApiClient.parameterToString(async));
}
if (zuoraCacheEnabled != null) {
localVarHeaderParams.put("zuora-cache-enabled", localVarApiClient.parameterToString(zuoraCacheEnabled));
}
if (zuoraEntityIds != null) {
localVarHeaderParams.put("zuora-entity-ids", localVarApiClient.parameterToString(zuoraEntityIds));
}
if (idempotencyKey != null) {
localVarHeaderParams.put("idempotency-key", localVarApiClient.parameterToString(idempotencyKey));
}
if (acceptEncoding != null) {
localVarHeaderParams.put("accept-encoding", localVarApiClient.parameterToString(acceptEncoding));
}
if (contentEncoding != null) {
localVarHeaderParams.put("content-encoding", localVarApiClient.parameterToString(contentEncoding));
}
if (zuoraOrgIds != null) {
localVarHeaderParams.put("zuora-org-ids", localVarApiClient.parameterToString(zuoraOrgIds));
}
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "bearerAuth" };
return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call cancelOrderValidateBeforeCall(String orderId, OrderCancellationRequest orderCancellationRequest, List fields, List orderFields, List orderActionsFields, List subscriptionsFields, List lineItemsFields, List subscriptionPlansFields, List subscriptionItemsFields, List invoiceItemsFields, List expand, List filter, Integer pageSize, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'orderId' is set
if (orderId == null) {
throw new ApiException("Missing the required parameter 'orderId' when calling cancelOrder(Async)");
}
// verify the required parameter 'orderCancellationRequest' is set
if (orderCancellationRequest == null) {
throw new ApiException("Missing the required parameter 'orderCancellationRequest' when calling cancelOrder(Async)");
}
return cancelOrderCall(orderId, orderCancellationRequest, fields, orderFields, orderActionsFields, subscriptionsFields, lineItemsFields, subscriptionPlansFields, subscriptionItemsFields, invoiceItemsFields, expand, filter, pageSize, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback);
}
private ApiResponse cancelOrderWithHttpInfo(String orderId, OrderCancellationRequest orderCancellationRequest, List fields, List orderFields, List orderActionsFields, List subscriptionsFields, List lineItemsFields, List subscriptionPlansFields, List subscriptionItemsFields, List invoiceItemsFields, List expand, List filter, Integer pageSize, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds) throws ApiException {
okhttp3.Call localVarCall = cancelOrderValidateBeforeCall(orderId, orderCancellationRequest, fields, orderFields, orderActionsFields, subscriptionsFields, lineItemsFields, subscriptionPlansFields, subscriptionItemsFields, invoiceItemsFields, expand, filter, pageSize, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, null);
try {
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
} catch (ApiException e) {
e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType()));
throw e;
}
}
private okhttp3.Call cancelOrderAsync(String orderId, OrderCancellationRequest orderCancellationRequest, List fields, List orderFields, List orderActionsFields, List subscriptionsFields, List lineItemsFields, List subscriptionPlansFields, List subscriptionItemsFields, List invoiceItemsFields, List expand, List filter, Integer pageSize, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = cancelOrderValidateBeforeCall(orderId, orderCancellationRequest, fields, orderFields, orderActionsFields, subscriptionsFields, lineItemsFields, subscriptionPlansFields, subscriptionItemsFields, invoiceItemsFields, expand, filter, pageSize, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public static class CancelOrderParams {
private final String orderId;
private final OrderCancellationRequest orderCancellationRequest;
private Headers headers;
/*
* Check for list params
*/
private GetByIdQueryParams getByIdQueryParams;
private List fields;
private List orderFields;
private List orderActionsFields;
private List subscriptionsFields;
private List lineItemsFields;
private List subscriptionPlansFields;
private List subscriptionItemsFields;
private List invoiceItemsFields;
private List expand;
private List filter;
private Integer pageSize;
private String zuoraTrackId;
private Boolean async;
private Boolean zuoraCacheEnabled;
private String zuoraEntityIds;
private String idempotencyKey;
private String acceptEncoding;
private String contentEncoding;
private String zuoraOrgIds;
public CancelOrderParams(String orderId, OrderCancellationRequest orderCancellationRequest) {
this.orderId = orderId;
this.orderCancellationRequest = orderCancellationRequest;
}
/**
* Set getByIdQueryParams
* @param getByIdQueryParams GetByIdQueryParams
* @return CancelOrderParams
*/
public CancelOrderParams getByIdQueryParams(GetByIdQueryParams getByIdQueryParams) {
this.getByIdQueryParams = getByIdQueryParams;
if (expand != null) {
this.expand = getByIdQueryParams.getExpand();
}
if (filter != null) {
this.filter = getByIdQueryParams.getFilter();
}
if (pageSize != null) {
this.pageSize = getByIdQueryParams.getPageSize();
}
return this;
}
/**
* Set headers
* @param headers Headers
* @return CancelOrderParams
*/
public CancelOrderParams headers(Headers headers) {
this.headers = headers;
if (headers.getZuoraTrackId() != null) {
this.zuoraTrackId = headers.getZuoraTrackId();
}
if (headers.getAsync() != null) {
this.async = headers.getAsync();
}
if (headers.getZuoraCacheEnabled() != null) {
this.zuoraCacheEnabled = headers.getZuoraCacheEnabled();
}
if (headers.getZuoraEntityIds() != null) {
this.zuoraEntityIds = headers.getZuoraEntityIds();
}
if (headers.getIdempotencyKey() != null) {
this.idempotencyKey = headers.getIdempotencyKey();
}
if (headers.getAcceptEncoding() != null) {
this.acceptEncoding = headers.getAcceptEncoding();
}
if (headers.getContentEncoding() != null) {
this.contentEncoding = headers.getContentEncoding();
}
if (headers.getZuoraOrgIds() != null) {
this.zuoraOrgIds = headers.getZuoraOrgIds();
}
return this;
}
/**
* Set fields
* @param fields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `account_id`, `order_number`, `order_date`, `state`, `category`, `description`, `scheduled_date`, `scheduled_date_policy`, `line_items`, `subscriptions` </details> (optional)
* @return CancelOrderParams
*/
public CancelOrderParams fields(List fields) {
this.fields = fields;
return this;
}
/**
* Set orderFields
* @param orderFields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `account_id`, `order_number`, `order_date`, `state`, `category`, `description`, `scheduled_date`, `scheduled_date_policy`, `line_items`, `subscriptions` </details> (optional)
* @return CancelOrderParams
*/
public CancelOrderParams orderFields(List orderFields) {
this.orderFields = orderFields;
return this;
}
/**
* Set orderActionsFields
* @param orderActionsFields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `type`, `action_id`, `sequence`, `start_on`, `subscription_plans`, `renew`, `terms`, `cancel`, `pause`, `resume`, `order` </details> (optional)
* @return CancelOrderParams
*/
public CancelOrderParams orderActionsFields(List orderActionsFields) {
this.orderActionsFields = orderActionsFields;
return this;
}
/**
* Set subscriptionsFields
* @param subscriptionsFields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `subscription_number`, `state`, `account_id`, `invoice_owner_account_id`, `auto_renew`, `version`, `initial_term`, `current_term`, `renewal_term`, `start_date`, `end_date`, `description`, `contract_effective`, `service_activation`, `customer_acceptance`, `invoice_separately`, `latest_version`, `payment_terms`, `billing_document_settings`, `bill_to_id`, `sold_to_id`, `contracted_mrr`, `currency`, `cancel_reason`, `last_booking_date`, `actions` </details> (optional)
* @return CancelOrderParams
*/
public CancelOrderParams subscriptionsFields(List subscriptionsFields) {
this.subscriptionsFields = subscriptionsFields;
return this;
}
/**
* Set lineItemsFields
* @param lineItemsFields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `total`, `subtotal`, `quantity_fulfilled`, `quantity_pending_fulfillment`, `unit_of_measure`, `accounting_code`, `adjustment_liability_account`, `unit_amount`, `target_date`, `billing_rule`, `contract_asset_account`, `contract_liability_account`, `description`, `discount_total`, `revenue`, `discount_unit_amount`, `discount_percent`, `category`, `name`, `item_number`, `type`, `list_price`, `list_unit_price`, `original_order_date`, `original_order_id`, `original_order_line_item_id`, `original_order_line_item_number`, `original_order_number`, `product_code`, `price_id`, `purchase_order_number`, `quantity`, `quantity_available_for_return`, `related_subscription_number`, `requires_fulfillment`, `sold_to_id`, `original_sold_to_id`, `tax_code`, `tax_inclusive`, `end_date`, `start_date`, `unbilled_receivables_account`, `state`, `order_id` </details> (optional)
* @return CancelOrderParams
*/
public CancelOrderParams lineItemsFields(List lineItemsFields) {
this.lineItemsFields = lineItemsFields;
return this;
}
/**
* Set subscriptionPlansFields
* @param subscriptionPlansFields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `name`, `plan_id`, `subscription_id`, `product_id`, `subscription_plan_number`, `subscription_items` </details> (optional)
* @return CancelOrderParams
*/
public CancelOrderParams subscriptionPlansFields(List subscriptionPlansFields) {
this.subscriptionPlansFields = subscriptionPlansFields;
return this;
}
/**
* Set subscriptionItemsFields
* @param subscriptionItemsFields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `start_date`, `end_date`, `charge_model`, `charge_type`, `tiers`, `subscription_item_number`, `name`, `description`, `charged_through_date`, `recurring`, `price_id`, `start_event`, `tax_code`, `tax_inclusive`, `unit_of_measure`, `quantity`, `price_base_interval`, `overage`, `subscription_plan_id`, `tiers_mode`, `processed_through_date`, `active`, `state`, `unit_amount`, `amount`, `discount_amount`, `discount_percent`, `price_change_percentage`, `price_change_option` </details> (optional)
* @return CancelOrderParams
*/
public CancelOrderParams subscriptionItemsFields(List subscriptionItemsFields) {
this.subscriptionItemsFields = subscriptionItemsFields;
return this;
}
/**
* Set invoiceItemsFields
* @param invoiceItemsFields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `amount`, `booking_reference`, `applied_to_item_id`, `price_id`, `discount_item`, `deferred_revenue_account`, `description`, `invoice_id`, `sku`, `name`, `purchase_order_number`, `quantity`, `recognized_revenue_account`, `remaining_balance`, `revenue_recognition_rule_name`, `accounting_code`, `service_end`, `service_start`, `accounts_receivable_account`, `subscription_id`, `subscription_item_id`, `tax`, `tax_code`, `tax_inclusive`, `unit_amount`, `unit_of_measure`, `document_item_date` </details> (optional)
* @return CancelOrderParams
*/
public CancelOrderParams invoiceItemsFields(List invoiceItemsFields) {
this.invoiceItemsFields = invoiceItemsFields;
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 CancelOrderParams
*/
public CancelOrderParams expand(List expand) {
this.expand = expand;
return this;
}
/**
* Set filter
* @param filter A case-sensitive filter on the list. See the [Filter lists](https://developer.zuora.com/quickstart-api/tutorial/filter-lists/) section of the Quickstart API Tutorial for detailed instructions. Note that the filters on this operation are only applicable to the related objects. For example, when you are calling the \"Retrieve a billing document\" operation, you can use the `filter[]` parameter on the related objects such as `filter[]=items[account_id].EQ:8ad09e208858b5cf0188595208151c63` (optional)
* @return CancelOrderParams
*/
public CancelOrderParams 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 CancelOrderParams
*/
public CancelOrderParams pageSize(Integer pageSize) {
this.pageSize = pageSize;
return this;
}
}
/**
* Cancel an order
* Cancels a draft order.
* @param orderId Identifier for the order, either `order_number` or `order_id` (required)
* @param orderCancellationRequest (required)
* @return OrderCancelResponse
* @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 CancelOrderParams cancelOrderParams(String orderId, OrderCancellationRequest orderCancellationRequest) {
return new CancelOrderParams(orderId, orderCancellationRequest);
}
public OrderCancelResponse cancelOrder(String orderId, OrderCancellationRequest orderCancellationRequest) throws ApiException {
CancelOrderParams params = new CancelOrderParams(orderId, orderCancellationRequest);
return executeCancelOrderAPICall(params).getData();
}
/**
* Expose HTTP info
public ApiResponse cancelOrderWithHttpInfo(String orderId, OrderCancellationRequest orderCancellationRequest) throws ApiException {
CancelOrderParams params = new CancelOrderParams(orderId, orderCancellationRequest);
return executeCancelOrderAPICall(params);
}
**/
/**
Legacy Query Params Requests
**/
public OrderCancelResponse cancelOrder( String orderId , OrderCancellationRequest orderCancellationRequest , List expand) throws ApiException {
CancelOrderParams params = new CancelOrderParams(orderId, orderCancellationRequest);
params.expand(expand);
return executeCancelOrderAPICall(params).getData();
}
/*
* add header methods
*/
public OrderCancelResponse cancelOrder(String orderId , OrderCancellationRequest orderCancellationRequest ,List expand,Headers headers) throws ApiException {
CancelOrderParams params = new CancelOrderParams(orderId, orderCancellationRequest)
.expand(expand)
.headers(headers);
return executeCancelOrderAPICall(params).getData();
}
/**
* Cancel an order
* Cancels a draft order.
* @param params CancelOrderParams
* @return OrderCancelResponse
* @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 OrderCancelResponse cancelOrder(CancelOrderParams params) throws ApiException {
return executeCancelOrderAPICall(params).getData();
}
public ApiResponse cancelOrderWithHttpInfo(CancelOrderParams params) throws ApiException {
return executeCancelOrderAPICall(params);
}
ApiResponse executeCancelOrderAPICall(CancelOrderParams params) throws ApiException {
return cancelOrderWithHttpInfo(params.orderId, params.orderCancellationRequest, params.fields, params.orderFields, params.orderActionsFields, params.subscriptionsFields, params.lineItemsFields, params.subscriptionPlansFields, params.subscriptionItemsFields, params.invoiceItemsFields, params.expand, params.filter, params.pageSize, params.zuoraTrackId, params.async, params.zuoraCacheEnabled, params.zuoraEntityIds, params.idempotencyKey, params.acceptEncoding, params.contentEncoding, params.zuoraOrgIds);
}
private okhttp3.Call createOrderCall(OrderCreateRequest orderCreateRequest, List fields, List orderFields, List orderActionsFields, List subscriptionsFields, List lineItemsFields, List subscriptionPlansFields, List subscriptionItemsFields, List invoiceItemsFields, List expand, List filter, Integer pageSize, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = orderCreateRequest;
// create path and map variables
String localVarPath = "/orders";
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 (orderFields != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "order.fields[]", orderFields));
}
if (orderActionsFields != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "order_actions.fields[]", orderActionsFields));
}
if (subscriptionsFields != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "subscriptions.fields[]", subscriptionsFields));
}
if (lineItemsFields != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "line_items.fields[]", lineItemsFields));
}
if (subscriptionPlansFields != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "subscription_plans.fields[]", subscriptionPlansFields));
}
if (subscriptionItemsFields != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "subscription_items.fields[]", subscriptionItemsFields));
}
if (invoiceItemsFields != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "invoice_items.fields[]", invoiceItemsFields));
}
if (expand != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand));
}
if (filter != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter));
}
if (pageSize != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_size", pageSize));
}
if (zuoraTrackId != null) {
localVarHeaderParams.put("zuora-track-id", localVarApiClient.parameterToString(zuoraTrackId));
}
if (async != null) {
localVarHeaderParams.put("async", localVarApiClient.parameterToString(async));
}
if (zuoraCacheEnabled != null) {
localVarHeaderParams.put("zuora-cache-enabled", localVarApiClient.parameterToString(zuoraCacheEnabled));
}
if (zuoraEntityIds != null) {
localVarHeaderParams.put("zuora-entity-ids", localVarApiClient.parameterToString(zuoraEntityIds));
}
if (idempotencyKey != null) {
localVarHeaderParams.put("idempotency-key", localVarApiClient.parameterToString(idempotencyKey));
}
if (acceptEncoding != null) {
localVarHeaderParams.put("accept-encoding", localVarApiClient.parameterToString(acceptEncoding));
}
if (contentEncoding != null) {
localVarHeaderParams.put("content-encoding", localVarApiClient.parameterToString(contentEncoding));
}
if (zuoraOrgIds != null) {
localVarHeaderParams.put("zuora-org-ids", localVarApiClient.parameterToString(zuoraOrgIds));
}
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "bearerAuth" };
return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call createOrderValidateBeforeCall(OrderCreateRequest orderCreateRequest, List fields, List orderFields, List orderActionsFields, List subscriptionsFields, List lineItemsFields, List subscriptionPlansFields, List subscriptionItemsFields, List invoiceItemsFields, List expand, List filter, Integer pageSize, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'orderCreateRequest' is set
if (orderCreateRequest == null) {
throw new ApiException("Missing the required parameter 'orderCreateRequest' when calling createOrder(Async)");
}
return createOrderCall(orderCreateRequest, fields, orderFields, orderActionsFields, subscriptionsFields, lineItemsFields, subscriptionPlansFields, subscriptionItemsFields, invoiceItemsFields, expand, filter, pageSize, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback);
}
private ApiResponse createOrderWithHttpInfo(OrderCreateRequest orderCreateRequest, List fields, List orderFields, List orderActionsFields, List subscriptionsFields, List lineItemsFields, List subscriptionPlansFields, List subscriptionItemsFields, List invoiceItemsFields, List expand, List filter, Integer pageSize, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds) throws ApiException {
okhttp3.Call localVarCall = createOrderValidateBeforeCall(orderCreateRequest, fields, orderFields, orderActionsFields, subscriptionsFields, lineItemsFields, subscriptionPlansFields, subscriptionItemsFields, invoiceItemsFields, expand, filter, pageSize, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, null);
try {
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
} catch (ApiException e) {
e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType()));
throw e;
}
}
private okhttp3.Call createOrderAsync(OrderCreateRequest orderCreateRequest, List fields, List orderFields, List orderActionsFields, List subscriptionsFields, List lineItemsFields, List subscriptionPlansFields, List subscriptionItemsFields, List invoiceItemsFields, List expand, List filter, Integer pageSize, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = createOrderValidateBeforeCall(orderCreateRequest, fields, orderFields, orderActionsFields, subscriptionsFields, lineItemsFields, subscriptionPlansFields, subscriptionItemsFields, invoiceItemsFields, expand, filter, pageSize, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public static class CreateOrderParams {
private final OrderCreateRequest orderCreateRequest;
private Headers headers;
/*
* Check for list params
*/
private GetByIdQueryParams getByIdQueryParams;
private List fields;
private List orderFields;
private List orderActionsFields;
private List subscriptionsFields;
private List lineItemsFields;
private List subscriptionPlansFields;
private List subscriptionItemsFields;
private List invoiceItemsFields;
private List expand;
private List filter;
private Integer pageSize;
private String zuoraTrackId;
private Boolean async;
private Boolean zuoraCacheEnabled;
private String zuoraEntityIds;
private String idempotencyKey;
private String acceptEncoding;
private String contentEncoding;
private String zuoraOrgIds;
public CreateOrderParams(OrderCreateRequest orderCreateRequest) {
this.orderCreateRequest = orderCreateRequest;
}
/**
* Set getByIdQueryParams
* @param getByIdQueryParams GetByIdQueryParams
* @return CreateOrderParams
*/
public CreateOrderParams getByIdQueryParams(GetByIdQueryParams getByIdQueryParams) {
this.getByIdQueryParams = getByIdQueryParams;
if (expand != null) {
this.expand = getByIdQueryParams.getExpand();
}
if (filter != null) {
this.filter = getByIdQueryParams.getFilter();
}
if (pageSize != null) {
this.pageSize = getByIdQueryParams.getPageSize();
}
return this;
}
/**
* Set headers
* @param headers Headers
* @return CreateOrderParams
*/
public CreateOrderParams headers(Headers headers) {
this.headers = headers;
if (headers.getZuoraTrackId() != null) {
this.zuoraTrackId = headers.getZuoraTrackId();
}
if (headers.getAsync() != null) {
this.async = headers.getAsync();
}
if (headers.getZuoraCacheEnabled() != null) {
this.zuoraCacheEnabled = headers.getZuoraCacheEnabled();
}
if (headers.getZuoraEntityIds() != null) {
this.zuoraEntityIds = headers.getZuoraEntityIds();
}
if (headers.getIdempotencyKey() != null) {
this.idempotencyKey = headers.getIdempotencyKey();
}
if (headers.getAcceptEncoding() != null) {
this.acceptEncoding = headers.getAcceptEncoding();
}
if (headers.getContentEncoding() != null) {
this.contentEncoding = headers.getContentEncoding();
}
if (headers.getZuoraOrgIds() != null) {
this.zuoraOrgIds = headers.getZuoraOrgIds();
}
return this;
}
/**
* Set fields
* @param fields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `account_id`, `order_number`, `order_date`, `state`, `category`, `description`, `scheduled_date`, `scheduled_date_policy`, `line_items`, `subscriptions` </details> (optional)
* @return CreateOrderParams
*/
public CreateOrderParams fields(List fields) {
this.fields = fields;
return this;
}
/**
* Set orderFields
* @param orderFields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `account_id`, `order_number`, `order_date`, `state`, `category`, `description`, `scheduled_date`, `scheduled_date_policy`, `line_items`, `subscriptions` </details> (optional)
* @return CreateOrderParams
*/
public CreateOrderParams orderFields(List orderFields) {
this.orderFields = orderFields;
return this;
}
/**
* Set orderActionsFields
* @param orderActionsFields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `type`, `action_id`, `sequence`, `start_on`, `subscription_plans`, `renew`, `terms`, `cancel`, `pause`, `resume`, `order` </details> (optional)
* @return CreateOrderParams
*/
public CreateOrderParams orderActionsFields(List orderActionsFields) {
this.orderActionsFields = orderActionsFields;
return this;
}
/**
* Set subscriptionsFields
* @param subscriptionsFields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `subscription_number`, `state`, `account_id`, `invoice_owner_account_id`, `auto_renew`, `version`, `initial_term`, `current_term`, `renewal_term`, `start_date`, `end_date`, `description`, `contract_effective`, `service_activation`, `customer_acceptance`, `invoice_separately`, `latest_version`, `payment_terms`, `billing_document_settings`, `bill_to_id`, `sold_to_id`, `contracted_mrr`, `currency`, `cancel_reason`, `last_booking_date`, `actions` </details> (optional)
* @return CreateOrderParams
*/
public CreateOrderParams subscriptionsFields(List subscriptionsFields) {
this.subscriptionsFields = subscriptionsFields;
return this;
}
/**
* Set lineItemsFields
* @param lineItemsFields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `total`, `subtotal`, `quantity_fulfilled`, `quantity_pending_fulfillment`, `unit_of_measure`, `accounting_code`, `adjustment_liability_account`, `unit_amount`, `target_date`, `billing_rule`, `contract_asset_account`, `contract_liability_account`, `description`, `discount_total`, `revenue`, `discount_unit_amount`, `discount_percent`, `category`, `name`, `item_number`, `type`, `list_price`, `list_unit_price`, `original_order_date`, `original_order_id`, `original_order_line_item_id`, `original_order_line_item_number`, `original_order_number`, `product_code`, `price_id`, `purchase_order_number`, `quantity`, `quantity_available_for_return`, `related_subscription_number`, `requires_fulfillment`, `sold_to_id`, `original_sold_to_id`, `tax_code`, `tax_inclusive`, `end_date`, `start_date`, `unbilled_receivables_account`, `state`, `order_id` </details> (optional)
* @return CreateOrderParams
*/
public CreateOrderParams lineItemsFields(List lineItemsFields) {
this.lineItemsFields = lineItemsFields;
return this;
}
/**
* Set subscriptionPlansFields
* @param subscriptionPlansFields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `name`, `plan_id`, `subscription_id`, `product_id`, `subscription_plan_number`, `subscription_items` </details> (optional)
* @return CreateOrderParams
*/
public CreateOrderParams subscriptionPlansFields(List subscriptionPlansFields) {
this.subscriptionPlansFields = subscriptionPlansFields;
return this;
}
/**
* Set subscriptionItemsFields
* @param subscriptionItemsFields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `start_date`, `end_date`, `charge_model`, `charge_type`, `tiers`, `subscription_item_number`, `name`, `description`, `charged_through_date`, `recurring`, `price_id`, `start_event`, `tax_code`, `tax_inclusive`, `unit_of_measure`, `quantity`, `price_base_interval`, `overage`, `subscription_plan_id`, `tiers_mode`, `processed_through_date`, `active`, `state`, `unit_amount`, `amount`, `discount_amount`, `discount_percent`, `price_change_percentage`, `price_change_option` </details> (optional)
* @return CreateOrderParams
*/
public CreateOrderParams subscriptionItemsFields(List subscriptionItemsFields) {
this.subscriptionItemsFields = subscriptionItemsFields;
return this;
}
/**
* Set invoiceItemsFields
* @param invoiceItemsFields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `amount`, `booking_reference`, `applied_to_item_id`, `price_id`, `discount_item`, `deferred_revenue_account`, `description`, `invoice_id`, `sku`, `name`, `purchase_order_number`, `quantity`, `recognized_revenue_account`, `remaining_balance`, `revenue_recognition_rule_name`, `accounting_code`, `service_end`, `service_start`, `accounts_receivable_account`, `subscription_id`, `subscription_item_id`, `tax`, `tax_code`, `tax_inclusive`, `unit_amount`, `unit_of_measure`, `document_item_date` </details> (optional)
* @return CreateOrderParams
*/
public CreateOrderParams invoiceItemsFields(List invoiceItemsFields) {
this.invoiceItemsFields = invoiceItemsFields;
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 CreateOrderParams
*/
public CreateOrderParams expand(List expand) {
this.expand = expand;
return this;
}
/**
* Set filter
* @param filter A case-sensitive filter on the list. See the [Filter lists](https://developer.zuora.com/quickstart-api/tutorial/filter-lists/) section of the Quickstart API Tutorial for detailed instructions. Note that the filters on this operation are only applicable to the related objects. For example, when you are calling the \"Retrieve a billing document\" operation, you can use the `filter[]` parameter on the related objects such as `filter[]=items[account_id].EQ:8ad09e208858b5cf0188595208151c63` (optional)
* @return CreateOrderParams
*/
public CreateOrderParams 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 CreateOrderParams
*/
public CreateOrderParams pageSize(Integer pageSize) {
this.pageSize = pageSize;
return this;
}
}
/**
* Create an order
* You can use this operation to create subscriptions and make changes to existing subscriptions. You can also use this operation to create order line items. <p> Note that the following limitations apply to this operation: <ul> <li>Up to 50 subscriptions are allowed in a single call.</li> <li>Up to 100 order line items are allowed in an order.</li> <li>Up to 1000 orders are allowed on a subscription.</li> </ul>
* @param orderCreateRequest (required)
* @return Order
* @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 CreateOrderParams createOrderParams(OrderCreateRequest orderCreateRequest) {
return new CreateOrderParams(orderCreateRequest);
}
public Order createOrder(OrderCreateRequest orderCreateRequest) throws ApiException {
CreateOrderParams params = new CreateOrderParams(orderCreateRequest);
return executeCreateOrderAPICall(params).getData();
}
/**
* Expose HTTP info
public ApiResponse createOrderWithHttpInfo(OrderCreateRequest orderCreateRequest) throws ApiException {
CreateOrderParams params = new CreateOrderParams(orderCreateRequest);
return executeCreateOrderAPICall(params);
}
**/
/**
Legacy Query Params Requests
**/
public Order createOrder( OrderCreateRequest orderCreateRequest , List expand) throws ApiException {
CreateOrderParams params = new CreateOrderParams(orderCreateRequest);
params.expand(expand);
return executeCreateOrderAPICall(params).getData();
}
/*
* add header methods
*/
public Order createOrder(OrderCreateRequest orderCreateRequest ,List expand,Headers headers) throws ApiException {
CreateOrderParams params = new CreateOrderParams(orderCreateRequest)
.expand(expand)
.headers(headers);
return executeCreateOrderAPICall(params).getData();
}
/**
* Create an order
* You can use this operation to create subscriptions and make changes to existing subscriptions. You can also use this operation to create order line items. <p> Note that the following limitations apply to this operation: <ul> <li>Up to 50 subscriptions are allowed in a single call.</li> <li>Up to 100 order line items are allowed in an order.</li> <li>Up to 1000 orders are allowed on a subscription.</li> </ul>
* @param params CreateOrderParams
* @return Order
* @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 Order create(CreateOrderParams params) throws ApiException {
return executeCreateOrderAPICall(params).getData();
}
public ApiResponse createWithHttpInfo(CreateOrderParams params) throws ApiException {
return executeCreateOrderAPICall(params);
}
ApiResponse executeCreateOrderAPICall(CreateOrderParams params) throws ApiException {
return createOrderWithHttpInfo(params.orderCreateRequest, params.fields, params.orderFields, params.orderActionsFields, params.subscriptionsFields, params.lineItemsFields, params.subscriptionPlansFields, params.subscriptionItemsFields, params.invoiceItemsFields, params.expand, params.filter, params.pageSize, params.zuoraTrackId, params.async, params.zuoraCacheEnabled, params.zuoraEntityIds, params.idempotencyKey, params.acceptEncoding, params.contentEncoding, params.zuoraOrgIds);
}
private okhttp3.Call createOrderPreviewCall(OrderPreviewCreateRequest orderPreviewCreateRequest, 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 = orderPreviewCreateRequest;
// create path and map variables
String localVarPath = "/orders/preview";
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 = {
"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 createOrderPreviewValidateBeforeCall(OrderPreviewCreateRequest orderPreviewCreateRequest, 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 'orderPreviewCreateRequest' is set
if (orderPreviewCreateRequest == null) {
throw new ApiException("Missing the required parameter 'orderPreviewCreateRequest' when calling createOrderPreview(Async)");
}
return createOrderPreviewCall(orderPreviewCreateRequest, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback);
}
private ApiResponse