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.PaymentScheduleItem;
import org.openapitools.client.model.PaymentScheduleItemCreateRequest;
import org.openapitools.client.model.PaymentScheduleItemPatch;
import org.openapitools.client.model.PaymentScheduleItemRetry;
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 PaymentScheduleItemsApi {
private ApiClient localVarApiClient;
private int localHostIndex;
private String localCustomBaseUrl;
public PaymentScheduleItemsApi() {
this(Configuration.getDefaultApiClient());
}
public PaymentScheduleItemsApi(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 cancelPaymentScheduleItemCall(String paymentScheduleItemId, List fields, List paymentScheduleItemFields, List paymentScheduleFields, 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 = "/payment_schedule_items/{payment_schedule_item_id}/cancel"
.replace("{" + "payment_schedule_item_id" + "}", localVarApiClient.escapeString(paymentScheduleItemId.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 (paymentScheduleItemFields != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "payment_schedule_item.fields[]", paymentScheduleItemFields));
}
if (paymentScheduleFields != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "payment_schedule.fields[]", paymentScheduleFields));
}
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 cancelPaymentScheduleItemValidateBeforeCall(String paymentScheduleItemId, List fields, List paymentScheduleItemFields, List paymentScheduleFields, 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 'paymentScheduleItemId' is set
if (paymentScheduleItemId == null) {
throw new ApiException("Missing the required parameter 'paymentScheduleItemId' when calling cancelPaymentScheduleItem(Async)");
}
return cancelPaymentScheduleItemCall(paymentScheduleItemId, fields, paymentScheduleItemFields, paymentScheduleFields, expand, filter, pageSize, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback);
}
private ApiResponse cancelPaymentScheduleItemWithHttpInfo(String paymentScheduleItemId, List fields, List paymentScheduleItemFields, List paymentScheduleFields, 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 = cancelPaymentScheduleItemValidateBeforeCall(paymentScheduleItemId, fields, paymentScheduleItemFields, paymentScheduleFields, 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 cancelPaymentScheduleItemAsync(String paymentScheduleItemId, List fields, List paymentScheduleItemFields, List paymentScheduleFields, 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 = cancelPaymentScheduleItemValidateBeforeCall(paymentScheduleItemId, fields, paymentScheduleItemFields, paymentScheduleFields, 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 CancelPaymentScheduleItemParams {
private final String paymentScheduleItemId;
private Headers headers;
/*
* Check for list params
*/
private GetByIdQueryParams getByIdQueryParams;
private List fields;
private List paymentScheduleItemFields;
private List paymentScheduleFields;
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 CancelPaymentScheduleItemParams(String paymentScheduleItemId) {
this.paymentScheduleItemId = paymentScheduleItemId;
}
/**
* Set getByIdQueryParams
* @param getByIdQueryParams GetByIdQueryParams
* @return CancelPaymentScheduleItemParams
*/
public CancelPaymentScheduleItemParams 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 CancelPaymentScheduleItemParams
*/
public CancelPaymentScheduleItemParams 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`, `amount`, `balance`, `currency`, `debit_memo_id`, `invoice_id`, `payment_id`, `payment_method_id`, `description`, `prepayment`, `payment_gateway_id`, `run_hour`, `state`, `scheduled_date`, `payment_schedule_item_number`, `payment_schedule_id`, `cancellation_reason`, `error_message`, `payment_option_id` </details> (optional)
* @return CancelPaymentScheduleItemParams
*/
public CancelPaymentScheduleItemParams fields(List fields) {
this.fields = fields;
return this;
}
/**
* Set paymentScheduleItemFields
* @param paymentScheduleItemFields 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`, `amount`, `balance`, `currency`, `debit_memo_id`, `invoice_id`, `payment_id`, `payment_method_id`, `description`, `prepayment`, `payment_gateway_id`, `run_hour`, `state`, `scheduled_date`, `payment_schedule_item_number`, `payment_schedule_id`, `cancellation_reason`, `error_message`, `payment_option_id` </details> (optional)
* @return CancelPaymentScheduleItemParams
*/
public CancelPaymentScheduleItemParams paymentScheduleItemFields(List paymentScheduleItemFields) {
this.paymentScheduleItemFields = paymentScheduleItemFields;
return this;
}
/**
* Set paymentScheduleFields
* @param paymentScheduleFields 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`, `description`, `next_payment_date`, `payment_schedule_number`, `number_of_payments`, `prepayment`, `start_date`, `run_hour`, `state`, `recent_payment_date`, `total_payments_errored`, `total_payments_processed`, `total_amount`, `debit_memo_id`, `invoice_id` </details> (optional)
* @return CancelPaymentScheduleItemParams
*/
public CancelPaymentScheduleItemParams paymentScheduleFields(List paymentScheduleFields) {
this.paymentScheduleFields = paymentScheduleFields;
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 CancelPaymentScheduleItemParams
*/
public CancelPaymentScheduleItemParams 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 CancelPaymentScheduleItemParams
*/
public CancelPaymentScheduleItemParams 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 CancelPaymentScheduleItemParams
*/
public CancelPaymentScheduleItemParams pageSize(Integer pageSize) {
this.pageSize = pageSize;
return this;
}
}
/**
* Cancel a payment schedule item
* Cancels the payment schedule item with the given ID.
* @param paymentScheduleItemId Identifier for the payment schedule item. Can be either `payment_schedule_item_id` or `payment_schedule_item_number` (required)
* @return PaymentScheduleItem
* @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 CancelPaymentScheduleItemParams cancelPaymentScheduleItemParams(String paymentScheduleItemId) {
return new CancelPaymentScheduleItemParams(paymentScheduleItemId);
}
public PaymentScheduleItem cancelPaymentScheduleItem(String paymentScheduleItemId) throws ApiException {
CancelPaymentScheduleItemParams params = new CancelPaymentScheduleItemParams(paymentScheduleItemId);
return executeCancelPaymentScheduleItemAPICall(params).getData();
}
/**
* Expose HTTP info
public ApiResponse cancelPaymentScheduleItemWithHttpInfo(String paymentScheduleItemId) throws ApiException {
CancelPaymentScheduleItemParams params = new CancelPaymentScheduleItemParams(paymentScheduleItemId);
return executeCancelPaymentScheduleItemAPICall(params);
}
**/
/**
Legacy Query Params Requests
**/
public PaymentScheduleItem cancelPaymentScheduleItem( String paymentScheduleItemId , List expand) throws ApiException {
CancelPaymentScheduleItemParams params = new CancelPaymentScheduleItemParams(paymentScheduleItemId);
params.expand(expand);
return executeCancelPaymentScheduleItemAPICall(params).getData();
}
/*
* add header methods
*/
public PaymentScheduleItem cancelPaymentScheduleItem(String paymentScheduleItemId ,List expand,Headers headers) throws ApiException {
CancelPaymentScheduleItemParams params = new CancelPaymentScheduleItemParams(paymentScheduleItemId)
.expand(expand)
.headers(headers);
return executeCancelPaymentScheduleItemAPICall(params).getData();
}
/**
* Cancel a payment schedule item
* Cancels the payment schedule item with the given ID.
* @param params CancelPaymentScheduleItemParams
* @return PaymentScheduleItem
* @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 PaymentScheduleItem post(CancelPaymentScheduleItemParams params) throws ApiException {
return executeCancelPaymentScheduleItemAPICall(params).getData();
}
public ApiResponse postWithHttpInfo(CancelPaymentScheduleItemParams params) throws ApiException {
return executeCancelPaymentScheduleItemAPICall(params);
}
ApiResponse executeCancelPaymentScheduleItemAPICall(CancelPaymentScheduleItemParams params) throws ApiException {
return cancelPaymentScheduleItemWithHttpInfo(params.paymentScheduleItemId, params.fields, params.paymentScheduleItemFields, params.paymentScheduleFields, 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 createPaymentScheduleItemCall(PaymentScheduleItemCreateRequest paymentScheduleItemCreateRequest, List fields, List paymentScheduleItemFields, List paymentScheduleFields, 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 = paymentScheduleItemCreateRequest;
// create path and map variables
String localVarPath = "/payment_schedule_items";
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 (paymentScheduleItemFields != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "payment_schedule_item.fields[]", paymentScheduleItemFields));
}
if (paymentScheduleFields != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "payment_schedule.fields[]", paymentScheduleFields));
}
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 createPaymentScheduleItemValidateBeforeCall(PaymentScheduleItemCreateRequest paymentScheduleItemCreateRequest, List fields, List paymentScheduleItemFields, List paymentScheduleFields, 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 'paymentScheduleItemCreateRequest' is set
if (paymentScheduleItemCreateRequest == null) {
throw new ApiException("Missing the required parameter 'paymentScheduleItemCreateRequest' when calling createPaymentScheduleItem(Async)");
}
return createPaymentScheduleItemCall(paymentScheduleItemCreateRequest, fields, paymentScheduleItemFields, paymentScheduleFields, expand, filter, pageSize, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback);
}
private ApiResponse createPaymentScheduleItemWithHttpInfo(PaymentScheduleItemCreateRequest paymentScheduleItemCreateRequest, List fields, List paymentScheduleItemFields, List paymentScheduleFields, 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 = createPaymentScheduleItemValidateBeforeCall(paymentScheduleItemCreateRequest, fields, paymentScheduleItemFields, paymentScheduleFields, 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 createPaymentScheduleItemAsync(PaymentScheduleItemCreateRequest paymentScheduleItemCreateRequest, List fields, List paymentScheduleItemFields, List paymentScheduleFields, 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 = createPaymentScheduleItemValidateBeforeCall(paymentScheduleItemCreateRequest, fields, paymentScheduleItemFields, paymentScheduleFields, 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 CreatePaymentScheduleItemParams {
private final PaymentScheduleItemCreateRequest paymentScheduleItemCreateRequest;
private Headers headers;
/*
* Check for list params
*/
private GetByIdQueryParams getByIdQueryParams;
private List fields;
private List paymentScheduleItemFields;
private List paymentScheduleFields;
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 CreatePaymentScheduleItemParams(PaymentScheduleItemCreateRequest paymentScheduleItemCreateRequest) {
this.paymentScheduleItemCreateRequest = paymentScheduleItemCreateRequest;
}
/**
* Set getByIdQueryParams
* @param getByIdQueryParams GetByIdQueryParams
* @return CreatePaymentScheduleItemParams
*/
public CreatePaymentScheduleItemParams 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 CreatePaymentScheduleItemParams
*/
public CreatePaymentScheduleItemParams 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`, `amount`, `balance`, `currency`, `debit_memo_id`, `invoice_id`, `payment_id`, `payment_method_id`, `description`, `prepayment`, `payment_gateway_id`, `run_hour`, `state`, `scheduled_date`, `payment_schedule_item_number`, `payment_schedule_id`, `cancellation_reason`, `error_message`, `payment_option_id` </details> (optional)
* @return CreatePaymentScheduleItemParams
*/
public CreatePaymentScheduleItemParams fields(List fields) {
this.fields = fields;
return this;
}
/**
* Set paymentScheduleItemFields
* @param paymentScheduleItemFields 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`, `amount`, `balance`, `currency`, `debit_memo_id`, `invoice_id`, `payment_id`, `payment_method_id`, `description`, `prepayment`, `payment_gateway_id`, `run_hour`, `state`, `scheduled_date`, `payment_schedule_item_number`, `payment_schedule_id`, `cancellation_reason`, `error_message`, `payment_option_id` </details> (optional)
* @return CreatePaymentScheduleItemParams
*/
public CreatePaymentScheduleItemParams paymentScheduleItemFields(List paymentScheduleItemFields) {
this.paymentScheduleItemFields = paymentScheduleItemFields;
return this;
}
/**
* Set paymentScheduleFields
* @param paymentScheduleFields 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`, `description`, `next_payment_date`, `payment_schedule_number`, `number_of_payments`, `prepayment`, `start_date`, `run_hour`, `state`, `recent_payment_date`, `total_payments_errored`, `total_payments_processed`, `total_amount`, `debit_memo_id`, `invoice_id` </details> (optional)
* @return CreatePaymentScheduleItemParams
*/
public CreatePaymentScheduleItemParams paymentScheduleFields(List paymentScheduleFields) {
this.paymentScheduleFields = paymentScheduleFields;
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 CreatePaymentScheduleItemParams
*/
public CreatePaymentScheduleItemParams 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 CreatePaymentScheduleItemParams
*/
public CreatePaymentScheduleItemParams 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 CreatePaymentScheduleItemParams
*/
public CreatePaymentScheduleItemParams pageSize(Integer pageSize) {
this.pageSize = pageSize;
return this;
}
}
/**
* Create a payment schedule item
* Creates a new Payment Schedule Item object.
* @param paymentScheduleItemCreateRequest (required)
* @return PaymentScheduleItem
* @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 CreatePaymentScheduleItemParams createPaymentScheduleItemParams(PaymentScheduleItemCreateRequest paymentScheduleItemCreateRequest) {
return new CreatePaymentScheduleItemParams(paymentScheduleItemCreateRequest);
}
public PaymentScheduleItem createPaymentScheduleItem(PaymentScheduleItemCreateRequest paymentScheduleItemCreateRequest) throws ApiException {
CreatePaymentScheduleItemParams params = new CreatePaymentScheduleItemParams(paymentScheduleItemCreateRequest);
return executeCreatePaymentScheduleItemAPICall(params).getData();
}
/**
* Expose HTTP info
public ApiResponse createPaymentScheduleItemWithHttpInfo(PaymentScheduleItemCreateRequest paymentScheduleItemCreateRequest) throws ApiException {
CreatePaymentScheduleItemParams params = new CreatePaymentScheduleItemParams(paymentScheduleItemCreateRequest);
return executeCreatePaymentScheduleItemAPICall(params);
}
**/
/**
Legacy Query Params Requests
**/
public PaymentScheduleItem createPaymentScheduleItem( PaymentScheduleItemCreateRequest paymentScheduleItemCreateRequest , List expand) throws ApiException {
CreatePaymentScheduleItemParams params = new CreatePaymentScheduleItemParams(paymentScheduleItemCreateRequest);
params.expand(expand);
return executeCreatePaymentScheduleItemAPICall(params).getData();
}
/*
* add header methods
*/
public PaymentScheduleItem createPaymentScheduleItem(PaymentScheduleItemCreateRequest paymentScheduleItemCreateRequest ,List expand,Headers headers) throws ApiException {
CreatePaymentScheduleItemParams params = new CreatePaymentScheduleItemParams(paymentScheduleItemCreateRequest)
.expand(expand)
.headers(headers);
return executeCreatePaymentScheduleItemAPICall(params).getData();
}
/**
* Create a payment schedule item
* Creates a new Payment Schedule Item object.
* @param params CreatePaymentScheduleItemParams
* @return PaymentScheduleItem
* @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 PaymentScheduleItem create(CreatePaymentScheduleItemParams params) throws ApiException {
return executeCreatePaymentScheduleItemAPICall(params).getData();
}
public ApiResponse createWithHttpInfo(CreatePaymentScheduleItemParams params) throws ApiException {
return executeCreatePaymentScheduleItemAPICall(params);
}
ApiResponse executeCreatePaymentScheduleItemAPICall(CreatePaymentScheduleItemParams params) throws ApiException {
return createPaymentScheduleItemWithHttpInfo(params.paymentScheduleItemCreateRequest, params.fields, params.paymentScheduleItemFields, params.paymentScheduleFields, 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 getPaymentScheduleItemCall(String paymentScheduleItemId, List fields, List paymentScheduleItemFields, List paymentScheduleFields, 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 = "/payment_schedule_items/{payment_schedule_item_id}"
.replace("{" + "payment_schedule_item_id" + "}", localVarApiClient.escapeString(paymentScheduleItemId.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 (paymentScheduleItemFields != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "payment_schedule_item.fields[]", paymentScheduleItemFields));
}
if (paymentScheduleFields != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "payment_schedule.fields[]", paymentScheduleFields));
}
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, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getPaymentScheduleItemValidateBeforeCall(String paymentScheduleItemId, List fields, List paymentScheduleItemFields, List paymentScheduleFields, 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 'paymentScheduleItemId' is set
if (paymentScheduleItemId == null) {
throw new ApiException("Missing the required parameter 'paymentScheduleItemId' when calling getPaymentScheduleItem(Async)");
}
return getPaymentScheduleItemCall(paymentScheduleItemId, fields, paymentScheduleItemFields, paymentScheduleFields, expand, filter, pageSize, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback);
}
private ApiResponse getPaymentScheduleItemWithHttpInfo(String paymentScheduleItemId, List fields, List paymentScheduleItemFields, List paymentScheduleFields, 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 = getPaymentScheduleItemValidateBeforeCall(paymentScheduleItemId, fields, paymentScheduleItemFields, paymentScheduleFields, 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 getPaymentScheduleItemAsync(String paymentScheduleItemId, List fields, List paymentScheduleItemFields, List paymentScheduleFields, 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 = getPaymentScheduleItemValidateBeforeCall(paymentScheduleItemId, fields, paymentScheduleItemFields, paymentScheduleFields, 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 GetPaymentScheduleItemParams {
private final String paymentScheduleItemId;
private Headers headers;
/*
* Check for list params
*/
private GetByIdQueryParams getByIdQueryParams;
private List fields;
private List paymentScheduleItemFields;
private List paymentScheduleFields;
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 GetPaymentScheduleItemParams(String paymentScheduleItemId) {
this.paymentScheduleItemId = paymentScheduleItemId;
}
/**
* Set getByIdQueryParams
* @param getByIdQueryParams GetByIdQueryParams
* @return GetPaymentScheduleItemParams
*/
public GetPaymentScheduleItemParams 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 GetPaymentScheduleItemParams
*/
public GetPaymentScheduleItemParams 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`, `amount`, `balance`, `currency`, `debit_memo_id`, `invoice_id`, `payment_id`, `payment_method_id`, `description`, `prepayment`, `payment_gateway_id`, `run_hour`, `state`, `scheduled_date`, `payment_schedule_item_number`, `payment_schedule_id`, `cancellation_reason`, `error_message`, `payment_option_id` </details> (optional)
* @return GetPaymentScheduleItemParams
*/
public GetPaymentScheduleItemParams fields(List fields) {
this.fields = fields;
return this;
}
/**
* Set paymentScheduleItemFields
* @param paymentScheduleItemFields 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`, `amount`, `balance`, `currency`, `debit_memo_id`, `invoice_id`, `payment_id`, `payment_method_id`, `description`, `prepayment`, `payment_gateway_id`, `run_hour`, `state`, `scheduled_date`, `payment_schedule_item_number`, `payment_schedule_id`, `cancellation_reason`, `error_message`, `payment_option_id` </details> (optional)
* @return GetPaymentScheduleItemParams
*/
public GetPaymentScheduleItemParams paymentScheduleItemFields(List paymentScheduleItemFields) {
this.paymentScheduleItemFields = paymentScheduleItemFields;
return this;
}
/**
* Set paymentScheduleFields
* @param paymentScheduleFields 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`, `description`, `next_payment_date`, `payment_schedule_number`, `number_of_payments`, `prepayment`, `start_date`, `run_hour`, `state`, `recent_payment_date`, `total_payments_errored`, `total_payments_processed`, `total_amount`, `debit_memo_id`, `invoice_id` </details> (optional)
* @return GetPaymentScheduleItemParams
*/
public GetPaymentScheduleItemParams paymentScheduleFields(List paymentScheduleFields) {
this.paymentScheduleFields = paymentScheduleFields;
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 GetPaymentScheduleItemParams
*/
public GetPaymentScheduleItemParams 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 GetPaymentScheduleItemParams
*/
public GetPaymentScheduleItemParams 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 GetPaymentScheduleItemParams
*/
public GetPaymentScheduleItemParams pageSize(Integer pageSize) {
this.pageSize = pageSize;
return this;
}
}
/**
* Retrieve a payment schedule item
* Retrieves the payment schedule item with the given ID.
* @param paymentScheduleItemId Identifier for the payment schedule item. Can be either `payment_schedule_item_id` or `payment_schedule_item_number` (required)
* @return PaymentScheduleItem
* @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 GetPaymentScheduleItemParams getPaymentScheduleItemParams(String paymentScheduleItemId) {
return new GetPaymentScheduleItemParams(paymentScheduleItemId);
}
public PaymentScheduleItem getPaymentScheduleItem(String paymentScheduleItemId) throws ApiException {
GetPaymentScheduleItemParams params = new GetPaymentScheduleItemParams(paymentScheduleItemId);
return executeGetPaymentScheduleItemAPICall(params).getData();
}
/**
* Expose HTTP info
public ApiResponse getPaymentScheduleItemWithHttpInfo(String paymentScheduleItemId) throws ApiException {
GetPaymentScheduleItemParams params = new GetPaymentScheduleItemParams(paymentScheduleItemId);
return executeGetPaymentScheduleItemAPICall(params);
}
**/
/**
Legacy Query Params Requests
**/
public PaymentScheduleItem getPaymentScheduleItem( String paymentScheduleItemId , List expand) throws ApiException {
GetPaymentScheduleItemParams params = new GetPaymentScheduleItemParams(paymentScheduleItemId);
params.expand(expand);
return executeGetPaymentScheduleItemAPICall(params).getData();
}
/*
* add header methods
*/
public PaymentScheduleItem getPaymentScheduleItem(String paymentScheduleItemId ,List expand,Headers headers) throws ApiException {
GetPaymentScheduleItemParams params = new GetPaymentScheduleItemParams(paymentScheduleItemId)
.expand(expand)
.headers(headers);
return executeGetPaymentScheduleItemAPICall(params).getData();
}
/**
* Retrieve a payment schedule item
* Retrieves the payment schedule item with the given ID.
* @param params GetPaymentScheduleItemParams
* @return PaymentScheduleItem
* @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 PaymentScheduleItem get(GetPaymentScheduleItemParams params) throws ApiException {
return executeGetPaymentScheduleItemAPICall(params).getData();
}
public ApiResponse getWithHttpInfo(GetPaymentScheduleItemParams params) throws ApiException {
return executeGetPaymentScheduleItemAPICall(params);
}
ApiResponse executeGetPaymentScheduleItemAPICall(GetPaymentScheduleItemParams params) throws ApiException {
return getPaymentScheduleItemWithHttpInfo(params.paymentScheduleItemId, params.fields, params.paymentScheduleItemFields, params.paymentScheduleFields, 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 retryPaymentScheduleItemCall(String paymentScheduleItemId, PaymentScheduleItemRetry paymentScheduleItemRetry, List fields, List paymentScheduleItemFields, List paymentScheduleFields, 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 = paymentScheduleItemRetry;
// create path and map variables
String localVarPath = "/payment_schedule_items/{payment_schedule_item_id}/retry"
.replace("{" + "payment_schedule_item_id" + "}", localVarApiClient.escapeString(paymentScheduleItemId.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 (paymentScheduleItemFields != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "payment_schedule_item.fields[]", paymentScheduleItemFields));
}
if (paymentScheduleFields != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "payment_schedule.fields[]", paymentScheduleFields));
}
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 retryPaymentScheduleItemValidateBeforeCall(String paymentScheduleItemId, PaymentScheduleItemRetry paymentScheduleItemRetry, List fields, List paymentScheduleItemFields, List paymentScheduleFields, 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 'paymentScheduleItemId' is set
if (paymentScheduleItemId == null) {
throw new ApiException("Missing the required parameter 'paymentScheduleItemId' when calling retryPaymentScheduleItem(Async)");
}
// verify the required parameter 'paymentScheduleItemRetry' is set
if (paymentScheduleItemRetry == null) {
throw new ApiException("Missing the required parameter 'paymentScheduleItemRetry' when calling retryPaymentScheduleItem(Async)");
}
return retryPaymentScheduleItemCall(paymentScheduleItemId, paymentScheduleItemRetry, fields, paymentScheduleItemFields, paymentScheduleFields, expand, filter, pageSize, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback);
}
private ApiResponse retryPaymentScheduleItemWithHttpInfo(String paymentScheduleItemId, PaymentScheduleItemRetry paymentScheduleItemRetry, List fields, List paymentScheduleItemFields, List paymentScheduleFields, 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 = retryPaymentScheduleItemValidateBeforeCall(paymentScheduleItemId, paymentScheduleItemRetry, fields, paymentScheduleItemFields, paymentScheduleFields, 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 retryPaymentScheduleItemAsync(String paymentScheduleItemId, PaymentScheduleItemRetry paymentScheduleItemRetry, List fields, List paymentScheduleItemFields, List paymentScheduleFields, 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 = retryPaymentScheduleItemValidateBeforeCall(paymentScheduleItemId, paymentScheduleItemRetry, fields, paymentScheduleItemFields, paymentScheduleFields, 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 RetryPaymentScheduleItemParams {
private final String paymentScheduleItemId;
private final PaymentScheduleItemRetry paymentScheduleItemRetry;
private Headers headers;
/*
* Check for list params
*/
private GetByIdQueryParams getByIdQueryParams;
private List fields;
private List paymentScheduleItemFields;
private List paymentScheduleFields;
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 RetryPaymentScheduleItemParams(String paymentScheduleItemId, PaymentScheduleItemRetry paymentScheduleItemRetry) {
this.paymentScheduleItemId = paymentScheduleItemId;
this.paymentScheduleItemRetry = paymentScheduleItemRetry;
}
/**
* Set getByIdQueryParams
* @param getByIdQueryParams GetByIdQueryParams
* @return RetryPaymentScheduleItemParams
*/
public RetryPaymentScheduleItemParams 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 RetryPaymentScheduleItemParams
*/
public RetryPaymentScheduleItemParams 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`, `amount`, `balance`, `currency`, `debit_memo_id`, `invoice_id`, `payment_id`, `payment_method_id`, `description`, `prepayment`, `payment_gateway_id`, `run_hour`, `state`, `scheduled_date`, `payment_schedule_item_number`, `payment_schedule_id`, `cancellation_reason`, `error_message`, `payment_option_id` </details> (optional)
* @return RetryPaymentScheduleItemParams
*/
public RetryPaymentScheduleItemParams fields(List fields) {
this.fields = fields;
return this;
}
/**
* Set paymentScheduleItemFields
* @param paymentScheduleItemFields 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`, `amount`, `balance`, `currency`, `debit_memo_id`, `invoice_id`, `payment_id`, `payment_method_id`, `description`, `prepayment`, `payment_gateway_id`, `run_hour`, `state`, `scheduled_date`, `payment_schedule_item_number`, `payment_schedule_id`, `cancellation_reason`, `error_message`, `payment_option_id` </details> (optional)
* @return RetryPaymentScheduleItemParams
*/
public RetryPaymentScheduleItemParams paymentScheduleItemFields(List paymentScheduleItemFields) {
this.paymentScheduleItemFields = paymentScheduleItemFields;
return this;
}
/**
* Set paymentScheduleFields
* @param paymentScheduleFields 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`, `description`, `next_payment_date`, `payment_schedule_number`, `number_of_payments`, `prepayment`, `start_date`, `run_hour`, `state`, `recent_payment_date`, `total_payments_errored`, `total_payments_processed`, `total_amount`, `debit_memo_id`, `invoice_id` </details> (optional)
* @return RetryPaymentScheduleItemParams
*/
public RetryPaymentScheduleItemParams paymentScheduleFields(List paymentScheduleFields) {
this.paymentScheduleFields = paymentScheduleFields;
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 RetryPaymentScheduleItemParams
*/
public RetryPaymentScheduleItemParams 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 RetryPaymentScheduleItemParams
*/
public RetryPaymentScheduleItemParams 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 RetryPaymentScheduleItemParams
*/
public RetryPaymentScheduleItemParams pageSize(Integer pageSize) {
this.pageSize = pageSize;
return this;
}
}
/**
* Retry a payment shedule item
* Retries the payment schedule item with the given ID.
* @param paymentScheduleItemId Identifier for the payment schedule item. Can be either `payment_schedule_item_id` or `payment_schedule_item_number` (required)
* @param paymentScheduleItemRetry (required)
* @return PaymentScheduleItem
* @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 RetryPaymentScheduleItemParams retryPaymentScheduleItemParams(String paymentScheduleItemId, PaymentScheduleItemRetry paymentScheduleItemRetry) {
return new RetryPaymentScheduleItemParams(paymentScheduleItemId, paymentScheduleItemRetry);
}
public PaymentScheduleItem retryPaymentScheduleItem(String paymentScheduleItemId, PaymentScheduleItemRetry paymentScheduleItemRetry) throws ApiException {
RetryPaymentScheduleItemParams params = new RetryPaymentScheduleItemParams(paymentScheduleItemId, paymentScheduleItemRetry);
return executeRetryPaymentScheduleItemAPICall(params).getData();
}
/**
* Expose HTTP info
public ApiResponse retryPaymentScheduleItemWithHttpInfo(String paymentScheduleItemId, PaymentScheduleItemRetry paymentScheduleItemRetry) throws ApiException {
RetryPaymentScheduleItemParams params = new RetryPaymentScheduleItemParams(paymentScheduleItemId, paymentScheduleItemRetry);
return executeRetryPaymentScheduleItemAPICall(params);
}
**/
/**
Legacy Query Params Requests
**/
public PaymentScheduleItem retryPaymentScheduleItem( String paymentScheduleItemId , PaymentScheduleItemRetry paymentScheduleItemRetry , List expand) throws ApiException {
RetryPaymentScheduleItemParams params = new RetryPaymentScheduleItemParams(paymentScheduleItemId, paymentScheduleItemRetry);
params.expand(expand);
return executeRetryPaymentScheduleItemAPICall(params).getData();
}
/*
* add header methods
*/
public PaymentScheduleItem retryPaymentScheduleItem(String paymentScheduleItemId , PaymentScheduleItemRetry paymentScheduleItemRetry ,List expand,Headers headers) throws ApiException {
RetryPaymentScheduleItemParams params = new RetryPaymentScheduleItemParams(paymentScheduleItemId, paymentScheduleItemRetry)
.expand(expand)
.headers(headers);
return executeRetryPaymentScheduleItemAPICall(params).getData();
}
/**
* Retry a payment shedule item
* Retries the payment schedule item with the given ID.
* @param params RetryPaymentScheduleItemParams
* @return PaymentScheduleItem
* @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 PaymentScheduleItem post(RetryPaymentScheduleItemParams params) throws ApiException {
return executeRetryPaymentScheduleItemAPICall(params).getData();
}
public ApiResponse postWithHttpInfo(RetryPaymentScheduleItemParams params) throws ApiException {
return executeRetryPaymentScheduleItemAPICall(params);
}
ApiResponse executeRetryPaymentScheduleItemAPICall(RetryPaymentScheduleItemParams params) throws ApiException {
return retryPaymentScheduleItemWithHttpInfo(params.paymentScheduleItemId, params.paymentScheduleItemRetry, params.fields, params.paymentScheduleItemFields, params.paymentScheduleFields, 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 skipPaymentScheduleItemCall(String paymentScheduleItemId, List fields, List paymentScheduleItemFields, List paymentScheduleFields, 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 = "/payment_schedule_items/{payment_schedule_item_id}/skip"
.replace("{" + "payment_schedule_item_id" + "}", localVarApiClient.escapeString(paymentScheduleItemId.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 (paymentScheduleItemFields != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "payment_schedule_item.fields[]", paymentScheduleItemFields));
}
if (paymentScheduleFields != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "payment_schedule.fields[]", paymentScheduleFields));
}
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 skipPaymentScheduleItemValidateBeforeCall(String paymentScheduleItemId, List fields, List paymentScheduleItemFields, List paymentScheduleFields, 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 'paymentScheduleItemId' is set
if (paymentScheduleItemId == null) {
throw new ApiException("Missing the required parameter 'paymentScheduleItemId' when calling skipPaymentScheduleItem(Async)");
}
return skipPaymentScheduleItemCall(paymentScheduleItemId, fields, paymentScheduleItemFields, paymentScheduleFields, expand, filter, pageSize, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback);
}
private ApiResponse skipPaymentScheduleItemWithHttpInfo(String paymentScheduleItemId, List fields, List paymentScheduleItemFields, List paymentScheduleFields, 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 = skipPaymentScheduleItemValidateBeforeCall(paymentScheduleItemId, fields, paymentScheduleItemFields, paymentScheduleFields, 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 skipPaymentScheduleItemAsync(String paymentScheduleItemId, List fields, List paymentScheduleItemFields, List paymentScheduleFields, 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 = skipPaymentScheduleItemValidateBeforeCall(paymentScheduleItemId, fields, paymentScheduleItemFields, paymentScheduleFields, 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 SkipPaymentScheduleItemParams {
private final String paymentScheduleItemId;
private Headers headers;
/*
* Check for list params
*/
private GetByIdQueryParams getByIdQueryParams;
private List fields;
private List paymentScheduleItemFields;
private List paymentScheduleFields;
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 SkipPaymentScheduleItemParams(String paymentScheduleItemId) {
this.paymentScheduleItemId = paymentScheduleItemId;
}
/**
* Set getByIdQueryParams
* @param getByIdQueryParams GetByIdQueryParams
* @return SkipPaymentScheduleItemParams
*/
public SkipPaymentScheduleItemParams 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 SkipPaymentScheduleItemParams
*/
public SkipPaymentScheduleItemParams 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`, `amount`, `balance`, `currency`, `debit_memo_id`, `invoice_id`, `payment_id`, `payment_method_id`, `description`, `prepayment`, `payment_gateway_id`, `run_hour`, `state`, `scheduled_date`, `payment_schedule_item_number`, `payment_schedule_id`, `cancellation_reason`, `error_message`, `payment_option_id` </details> (optional)
* @return SkipPaymentScheduleItemParams
*/
public SkipPaymentScheduleItemParams fields(List fields) {
this.fields = fields;
return this;
}
/**
* Set paymentScheduleItemFields
* @param paymentScheduleItemFields 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`, `amount`, `balance`, `currency`, `debit_memo_id`, `invoice_id`, `payment_id`, `payment_method_id`, `description`, `prepayment`, `payment_gateway_id`, `run_hour`, `state`, `scheduled_date`, `payment_schedule_item_number`, `payment_schedule_id`, `cancellation_reason`, `error_message`, `payment_option_id` </details> (optional)
* @return SkipPaymentScheduleItemParams
*/
public SkipPaymentScheduleItemParams paymentScheduleItemFields(List paymentScheduleItemFields) {
this.paymentScheduleItemFields = paymentScheduleItemFields;
return this;
}
/**
* Set paymentScheduleFields
* @param paymentScheduleFields 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`, `description`, `next_payment_date`, `payment_schedule_number`, `number_of_payments`, `prepayment`, `start_date`, `run_hour`, `state`, `recent_payment_date`, `total_payments_errored`, `total_payments_processed`, `total_amount`, `debit_memo_id`, `invoice_id` </details> (optional)
* @return SkipPaymentScheduleItemParams
*/
public SkipPaymentScheduleItemParams paymentScheduleFields(List paymentScheduleFields) {
this.paymentScheduleFields = paymentScheduleFields;
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 SkipPaymentScheduleItemParams
*/
public SkipPaymentScheduleItemParams 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 SkipPaymentScheduleItemParams
*/
public SkipPaymentScheduleItemParams 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 SkipPaymentScheduleItemParams
*/
public SkipPaymentScheduleItemParams pageSize(Integer pageSize) {
this.pageSize = pageSize;
return this;
}
}
/**
* Skip a payment schedule item
* Skips the payment schedule item with the given ID.
* @param paymentScheduleItemId Identifier for the payment schedule item. Can be either `payment_schedule_item_id` or `payment_schedule_item_number` (required)
* @return PaymentScheduleItem
* @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 SkipPaymentScheduleItemParams skipPaymentScheduleItemParams(String paymentScheduleItemId) {
return new SkipPaymentScheduleItemParams(paymentScheduleItemId);
}
public PaymentScheduleItem skipPaymentScheduleItem(String paymentScheduleItemId) throws ApiException {
SkipPaymentScheduleItemParams params = new SkipPaymentScheduleItemParams(paymentScheduleItemId);
return executeSkipPaymentScheduleItemAPICall(params).getData();
}
/**
* Expose HTTP info
public ApiResponse skipPaymentScheduleItemWithHttpInfo(String paymentScheduleItemId) throws ApiException {
SkipPaymentScheduleItemParams params = new SkipPaymentScheduleItemParams(paymentScheduleItemId);
return executeSkipPaymentScheduleItemAPICall(params);
}
**/
/**
Legacy Query Params Requests
**/
public PaymentScheduleItem skipPaymentScheduleItem( String paymentScheduleItemId , List expand) throws ApiException {
SkipPaymentScheduleItemParams params = new SkipPaymentScheduleItemParams(paymentScheduleItemId);
params.expand(expand);
return executeSkipPaymentScheduleItemAPICall(params).getData();
}
/*
* add header methods
*/
public PaymentScheduleItem skipPaymentScheduleItem(String paymentScheduleItemId ,List expand,Headers headers) throws ApiException {
SkipPaymentScheduleItemParams params = new SkipPaymentScheduleItemParams(paymentScheduleItemId)
.expand(expand)
.headers(headers);
return executeSkipPaymentScheduleItemAPICall(params).getData();
}
/**
* Skip a payment schedule item
* Skips the payment schedule item with the given ID.
* @param params SkipPaymentScheduleItemParams
* @return PaymentScheduleItem
* @http.response.details