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

org.openapitools.client.api.CreditMemosApi Maven / Gradle / Ivy

There is a newer version: 3.2.1
Show newest version
/*
* 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 org.openapitools.client.model.ApplyUnapplyCreditMemo;
import java.math.BigDecimal;
import org.openapitools.client.model.CreditMemo;
import org.openapitools.client.model.CreditMemoCreateRequest;
import org.openapitools.client.model.CreditMemoItemListResponse;
import org.openapitools.client.model.CreditMemoListResponse;
import org.openapitools.client.model.CreditMemoPatchRequest;
import org.openapitools.client.model.ErrorResponse;

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 CreditMemosApi {
    private ApiClient localVarApiClient;
    private int localHostIndex;
    private String localCustomBaseUrl;
    public CreditMemosApi() {
    this(Configuration.getDefaultApiClient());
    }

    public CreditMemosApi(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 applyCreditMemoCall(String creditMemoId, ApplyUnapplyCreditMemo applyUnapplyCreditMemo, List fields, List creditMemoFields, List appliedToFields, List creditMemoItemsFields, List taxationItemsFields, List accountFields, List billToFields, 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 = applyUnapplyCreditMemo;

        // create path and map variables
            String localVarPath = "/credit_memos/{credit_memo_id}/apply"
                .replace("{" + "credit_memo_id" + "}", localVarApiClient.escapeString(creditMemoId.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 (creditMemoFields != null) {
                localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "credit_memo.fields[]", creditMemoFields));
                    }

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

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

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

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

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

                    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 applyCreditMemoValidateBeforeCall(String creditMemoId, ApplyUnapplyCreditMemo applyUnapplyCreditMemo, List fields, List creditMemoFields, List appliedToFields, List creditMemoItemsFields, List taxationItemsFields, List accountFields, List billToFields, 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 'creditMemoId' is set
                        if (creditMemoId == null) {
                        throw new ApiException("Missing the required parameter 'creditMemoId' when calling applyCreditMemo(Async)");
                        }

                        // verify the required parameter 'applyUnapplyCreditMemo' is set
                        if (applyUnapplyCreditMemo == null) {
                        throw new ApiException("Missing the required parameter 'applyUnapplyCreditMemo' when calling applyCreditMemo(Async)");
                        }

                return applyCreditMemoCall(creditMemoId, applyUnapplyCreditMemo, fields, creditMemoFields, appliedToFields, creditMemoItemsFields, taxationItemsFields, accountFields, billToFields, expand, filter, pageSize, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback);
            }

        private ApiResponse applyCreditMemoWithHttpInfo(String creditMemoId, ApplyUnapplyCreditMemo applyUnapplyCreditMemo, List fields, List creditMemoFields, List appliedToFields, List creditMemoItemsFields, List taxationItemsFields, List accountFields, List billToFields, 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 = applyCreditMemoValidateBeforeCall(creditMemoId, applyUnapplyCreditMemo, fields, creditMemoFields, appliedToFields, creditMemoItemsFields, taxationItemsFields, accountFields, billToFields, 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 applyCreditMemoAsync(String creditMemoId, ApplyUnapplyCreditMemo applyUnapplyCreditMemo, List fields, List creditMemoFields, List appliedToFields, List creditMemoItemsFields, List taxationItemsFields, List accountFields, List billToFields, 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 = applyCreditMemoValidateBeforeCall(creditMemoId, applyUnapplyCreditMemo, fields, creditMemoFields, appliedToFields, creditMemoItemsFields, taxationItemsFields, accountFields, billToFields, 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 ApplyCreditMemoParams {
                    private final String creditMemoId;
                    private final ApplyUnapplyCreditMemo applyUnapplyCreditMemo;
            private Headers headers;
            /*
        * Check for list params
            */
                private GetByIdQueryParams getByIdQueryParams;
                    private List fields;
                    private List creditMemoFields;
                    private List appliedToFields;
                    private List creditMemoItemsFields;
                    private List taxationItemsFields;
                    private List accountFields;
                    private List billToFields;
                    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 ApplyCreditMemoParams(String creditMemoId, ApplyUnapplyCreditMemo applyUnapplyCreditMemo) {
                    this.creditMemoId = creditMemoId;
                    this.applyUnapplyCreditMemo = applyUnapplyCreditMemo;
                }
                    /**
                    * Set getByIdQueryParams
                    * @param getByIdQueryParams GetByIdQueryParams
                    * @return ApplyCreditMemoParams
                    */
                    public ApplyCreditMemoParams 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 ApplyCreditMemoParams
            */
            public ApplyCreditMemoParams 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`, `credit_memo_number`, `state_transitions`, `description`, `account_id`, `total`, `subtotal`, `tax`, `document_date`, `exclude_from_auto_apply_rules`, `posted_by_id`, `state`, `balance`, `invoice_id`, `reason_code`, `amount_refunded`, `bill_to_id`, `billing_document_settings`, `currency`          </details> (optional)
                    * @return ApplyCreditMemoParams
                    */
                    public ApplyCreditMemoParams fields(List fields) {
                    this.fields = fields;
                    return this;
                    }
                    /**
                    * Set creditMemoFields
                    * @param creditMemoFields 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`, `credit_memo_number`, `state_transitions`, `description`, `account_id`, `total`, `subtotal`, `tax`, `document_date`, `exclude_from_auto_apply_rules`, `posted_by_id`, `state`, `balance`, `invoice_id`, `reason_code`, `amount_refunded`, `bill_to_id`, `billing_document_settings`, `currency`          </details> (optional)
                    * @return ApplyCreditMemoParams
                    */
                    public ApplyCreditMemoParams creditMemoFields(List creditMemoFields) {
                    this.creditMemoFields = creditMemoFields;
                    return this;
                    }
                    /**
                    * Set appliedToFields
                    * @param appliedToFields Allows you to specify which fields are returned in the response.          <details>            <summary> Accepted values </summary>              `id`, `amount`, `billing_document_id`, `billing_document_type`          </details> (optional)
                    * @return ApplyCreditMemoParams
                    */
                    public ApplyCreditMemoParams appliedToFields(List appliedToFields) {
                    this.appliedToFields = appliedToFields;
                    return this;
                    }
                    /**
                    * Set creditMemoItemsFields
                    * @param creditMemoItemsFields 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`, `applied_to_item_id`, `price_id`, `discount_item`, `deferred_revenue_account`, `description`, `credit_memo_id`, `sku`, `name`, `purchase_order_number`, `quantity`, `recognized_revenue_account`, `remaining_balance`, `revenue_recognition_rule_name`, `service_end`, `service_start`, `accounts_receivable_account`, `on_account_account`, `subscription_id`, `subscription_item_id`, `tax`, `tax_code`, `tax_inclusive`, `unit_amount`, `unit_of_measure`, `subtotal`, `invoice_item_id`, `document_item_date`          </details> (optional)
                    * @return ApplyCreditMemoParams
                    */
                    public ApplyCreditMemoParams creditMemoItemsFields(List creditMemoItemsFields) {
                    this.creditMemoItemsFields = creditMemoItemsFields;
                    return this;
                    }
                    /**
                    * Set taxationItemsFields
                    * @param taxationItemsFields 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`, `amount_exempt`, `tax_date`, `jurisdiction`, `location_code`, `name`, `sales_tax_payable_account`, `tax_code`, `tax_code_name`, `tax_rate`, `tax_rate_name`, `tax_inclusive`, `tax_rate_type`, `source_tax_item_id`, `amount_applied`, `amount_refunded`, `on_account_account`          </details> (optional)
                    * @return ApplyCreditMemoParams
                    */
                    public ApplyCreditMemoParams taxationItemsFields(List taxationItemsFields) {
                    this.taxationItemsFields = taxationItemsFields;
                    return this;
                    }
                    /**
                    * Set accountFields
                    * @param accountFields 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`, `auto_pay`, `account_number`, `bill_to_id`, `sold_to_id`, `billing_document_settings`, `communication_profile_id`, `crm_id`, `sales_rep`, `parent_account_id`, `payment_gateway`, `payment_terms`, `remaining_credit_memo_balance`, `remaining_debit_memo_balance`, `remaining_invoice_balance`, `remaining_payment_balance`, `sequence_set_id`, `tax_certificate`, `batch`, `tax_identifier`, `bill_cycle_day`, `description`, `name`, `currency`, `default_payment_method_id`, `enabled`, `organization_id`          </details> (optional)
                    * @return ApplyCreditMemoParams
                    */
                    public ApplyCreditMemoParams accountFields(List accountFields) {
                    this.accountFields = accountFields;
                    return this;
                    }
                    /**
                    * Set billToFields
                    * @param billToFields 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`, `address`, `home_phone`, `first_name`, `last_name`, `email`, `work_email`, `nickname`, `other_phone`, `work_phone`, `mobile_phone`, `tax_region`, `other_phone_type`, `fax`          </details> (optional)
                    * @return ApplyCreditMemoParams
                    */
                    public ApplyCreditMemoParams billToFields(List billToFields) {
                    this.billToFields = billToFields;
                    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 ApplyCreditMemoParams
                    */
                    public ApplyCreditMemoParams 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 ApplyCreditMemoParams
                    */
                    public ApplyCreditMemoParams 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 ApplyCreditMemoParams
                    */
                    public ApplyCreditMemoParams pageSize(Integer pageSize) {
                    this.pageSize = pageSize;
                    return this;
                    }
                }

            /**
            * Apply a credit memo
            * Apply a credit memo to one or more other billing documents.
                * @param creditMemoId Identifier for the credit memo, either `credit_memo_number` or `credit_memo_id` (required)
                * @param applyUnapplyCreditMemo  (required)
            * @return CreditMemo
                * @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 ApplyCreditMemoParams applyCreditMemoParams(String creditMemoId, ApplyUnapplyCreditMemo applyUnapplyCreditMemo) { return new ApplyCreditMemoParams(creditMemoId, applyUnapplyCreditMemo); } public CreditMemo applyCreditMemo(String creditMemoId, ApplyUnapplyCreditMemo applyUnapplyCreditMemo) throws ApiException { ApplyCreditMemoParams params = new ApplyCreditMemoParams(creditMemoId, applyUnapplyCreditMemo); return executeApplyCreditMemoAPICall(params).getData(); } /** * Expose HTTP info public ApiResponse applyCreditMemoWithHttpInfo(String creditMemoId, ApplyUnapplyCreditMemo applyUnapplyCreditMemo) throws ApiException { ApplyCreditMemoParams params = new ApplyCreditMemoParams(creditMemoId, applyUnapplyCreditMemo); return executeApplyCreditMemoAPICall(params); } **/ /** Legacy Query Params Requests **/ public CreditMemo applyCreditMemo( String creditMemoId , ApplyUnapplyCreditMemo applyUnapplyCreditMemo , List expand) throws ApiException { ApplyCreditMemoParams params = new ApplyCreditMemoParams(creditMemoId, applyUnapplyCreditMemo); params.expand(expand); return executeApplyCreditMemoAPICall(params).getData(); } /* * add header methods */ public CreditMemo applyCreditMemo(String creditMemoId , ApplyUnapplyCreditMemo applyUnapplyCreditMemo ,List expand,Headers headers) throws ApiException { ApplyCreditMemoParams params = new ApplyCreditMemoParams(creditMemoId, applyUnapplyCreditMemo) .expand(expand) .headers(headers); return executeApplyCreditMemoAPICall(params).getData(); } /** * Apply a credit memo * Apply a credit memo to one or more other billing documents. * @param params ApplyCreditMemoParams * @return CreditMemo * @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 CreditMemo apply(ApplyCreditMemoParams params) throws ApiException { return executeApplyCreditMemoAPICall(params).getData(); } public ApiResponse applyWithHttpInfo(ApplyCreditMemoParams params) throws ApiException { return executeApplyCreditMemoAPICall(params); } ApiResponse executeApplyCreditMemoAPICall(ApplyCreditMemoParams params) throws ApiException { return applyCreditMemoWithHttpInfo(params.creditMemoId, params.applyUnapplyCreditMemo, params.fields, params.creditMemoFields, params.appliedToFields, params.creditMemoItemsFields, params.taxationItemsFields, params.accountFields, params.billToFields, 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 cancelCreditMemoCall(String creditMemoId, List fields, List creditMemoFields, List appliedToFields, List creditMemoItemsFields, List taxationItemsFields, List accountFields, List billToFields, 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 = "/credit_memos/{credit_memo_id}/cancel" .replace("{" + "credit_memo_id" + "}", localVarApiClient.escapeString(creditMemoId.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 (creditMemoFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "credit_memo.fields[]", creditMemoFields)); } if (appliedToFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "applied_to.fields[]", appliedToFields)); } if (creditMemoItemsFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "credit_memo_items.fields[]", creditMemoItemsFields)); } if (taxationItemsFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "taxation_items.fields[]", taxationItemsFields)); } if (accountFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "account.fields[]", accountFields)); } if (billToFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "bill_to.fields[]", billToFields)); } 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 cancelCreditMemoValidateBeforeCall(String creditMemoId, List fields, List creditMemoFields, List appliedToFields, List creditMemoItemsFields, List taxationItemsFields, List accountFields, List billToFields, 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 'creditMemoId' is set if (creditMemoId == null) { throw new ApiException("Missing the required parameter 'creditMemoId' when calling cancelCreditMemo(Async)"); } return cancelCreditMemoCall(creditMemoId, fields, creditMemoFields, appliedToFields, creditMemoItemsFields, taxationItemsFields, accountFields, billToFields, expand, filter, pageSize, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback); } private ApiResponse cancelCreditMemoWithHttpInfo(String creditMemoId, List fields, List creditMemoFields, List appliedToFields, List creditMemoItemsFields, List taxationItemsFields, List accountFields, List billToFields, 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 = cancelCreditMemoValidateBeforeCall(creditMemoId, fields, creditMemoFields, appliedToFields, creditMemoItemsFields, taxationItemsFields, accountFields, billToFields, 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 cancelCreditMemoAsync(String creditMemoId, List fields, List creditMemoFields, List appliedToFields, List creditMemoItemsFields, List taxationItemsFields, List accountFields, List billToFields, 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 = cancelCreditMemoValidateBeforeCall(creditMemoId, fields, creditMemoFields, appliedToFields, creditMemoItemsFields, taxationItemsFields, accountFields, billToFields, 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 CancelCreditMemoParams { private final String creditMemoId; private Headers headers; /* * Check for list params */ private GetByIdQueryParams getByIdQueryParams; private List fields; private List creditMemoFields; private List appliedToFields; private List creditMemoItemsFields; private List taxationItemsFields; private List accountFields; private List billToFields; 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 CancelCreditMemoParams(String creditMemoId) { this.creditMemoId = creditMemoId; } /** * Set getByIdQueryParams * @param getByIdQueryParams GetByIdQueryParams * @return CancelCreditMemoParams */ public CancelCreditMemoParams 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 CancelCreditMemoParams */ public CancelCreditMemoParams 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`, `credit_memo_number`, `state_transitions`, `description`, `account_id`, `total`, `subtotal`, `tax`, `document_date`, `exclude_from_auto_apply_rules`, `posted_by_id`, `state`, `balance`, `invoice_id`, `reason_code`, `amount_refunded`, `bill_to_id`, `billing_document_settings`, `currency` </details> (optional) * @return CancelCreditMemoParams */ public CancelCreditMemoParams fields(List fields) { this.fields = fields; return this; } /** * Set creditMemoFields * @param creditMemoFields 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`, `credit_memo_number`, `state_transitions`, `description`, `account_id`, `total`, `subtotal`, `tax`, `document_date`, `exclude_from_auto_apply_rules`, `posted_by_id`, `state`, `balance`, `invoice_id`, `reason_code`, `amount_refunded`, `bill_to_id`, `billing_document_settings`, `currency` </details> (optional) * @return CancelCreditMemoParams */ public CancelCreditMemoParams creditMemoFields(List creditMemoFields) { this.creditMemoFields = creditMemoFields; return this; } /** * Set appliedToFields * @param appliedToFields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `id`, `amount`, `billing_document_id`, `billing_document_type` </details> (optional) * @return CancelCreditMemoParams */ public CancelCreditMemoParams appliedToFields(List appliedToFields) { this.appliedToFields = appliedToFields; return this; } /** * Set creditMemoItemsFields * @param creditMemoItemsFields 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`, `applied_to_item_id`, `price_id`, `discount_item`, `deferred_revenue_account`, `description`, `credit_memo_id`, `sku`, `name`, `purchase_order_number`, `quantity`, `recognized_revenue_account`, `remaining_balance`, `revenue_recognition_rule_name`, `service_end`, `service_start`, `accounts_receivable_account`, `on_account_account`, `subscription_id`, `subscription_item_id`, `tax`, `tax_code`, `tax_inclusive`, `unit_amount`, `unit_of_measure`, `subtotal`, `invoice_item_id`, `document_item_date` </details> (optional) * @return CancelCreditMemoParams */ public CancelCreditMemoParams creditMemoItemsFields(List creditMemoItemsFields) { this.creditMemoItemsFields = creditMemoItemsFields; return this; } /** * Set taxationItemsFields * @param taxationItemsFields 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`, `amount_exempt`, `tax_date`, `jurisdiction`, `location_code`, `name`, `sales_tax_payable_account`, `tax_code`, `tax_code_name`, `tax_rate`, `tax_rate_name`, `tax_inclusive`, `tax_rate_type`, `source_tax_item_id`, `amount_applied`, `amount_refunded`, `on_account_account` </details> (optional) * @return CancelCreditMemoParams */ public CancelCreditMemoParams taxationItemsFields(List taxationItemsFields) { this.taxationItemsFields = taxationItemsFields; return this; } /** * Set accountFields * @param accountFields 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`, `auto_pay`, `account_number`, `bill_to_id`, `sold_to_id`, `billing_document_settings`, `communication_profile_id`, `crm_id`, `sales_rep`, `parent_account_id`, `payment_gateway`, `payment_terms`, `remaining_credit_memo_balance`, `remaining_debit_memo_balance`, `remaining_invoice_balance`, `remaining_payment_balance`, `sequence_set_id`, `tax_certificate`, `batch`, `tax_identifier`, `bill_cycle_day`, `description`, `name`, `currency`, `default_payment_method_id`, `enabled`, `organization_id` </details> (optional) * @return CancelCreditMemoParams */ public CancelCreditMemoParams accountFields(List accountFields) { this.accountFields = accountFields; return this; } /** * Set billToFields * @param billToFields 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`, `address`, `home_phone`, `first_name`, `last_name`, `email`, `work_email`, `nickname`, `other_phone`, `work_phone`, `mobile_phone`, `tax_region`, `other_phone_type`, `fax` </details> (optional) * @return CancelCreditMemoParams */ public CancelCreditMemoParams billToFields(List billToFields) { this.billToFields = billToFields; 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 CancelCreditMemoParams */ public CancelCreditMemoParams 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 CancelCreditMemoParams */ public CancelCreditMemoParams 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 CancelCreditMemoParams */ public CancelCreditMemoParams pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } } /** * Cancel a credit memo * Cancels a credit memo. Only credit memos with the Draft status can be cancelled. * @param creditMemoId Identifier for the credit memo, either `credit_memo_number` or `credit_memo_id` (required) * @return CreditMemo * @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 CancelCreditMemoParams cancelCreditMemoParams(String creditMemoId) { return new CancelCreditMemoParams(creditMemoId); } public CreditMemo cancelCreditMemo(String creditMemoId) throws ApiException { CancelCreditMemoParams params = new CancelCreditMemoParams(creditMemoId); return executeCancelCreditMemoAPICall(params).getData(); } /** * Expose HTTP info public ApiResponse cancelCreditMemoWithHttpInfo(String creditMemoId) throws ApiException { CancelCreditMemoParams params = new CancelCreditMemoParams(creditMemoId); return executeCancelCreditMemoAPICall(params); } **/ /** Legacy Query Params Requests **/ public CreditMemo cancelCreditMemo( String creditMemoId , List expand) throws ApiException { CancelCreditMemoParams params = new CancelCreditMemoParams(creditMemoId); params.expand(expand); return executeCancelCreditMemoAPICall(params).getData(); } /* * add header methods */ public CreditMemo cancelCreditMemo(String creditMemoId ,List expand,Headers headers) throws ApiException { CancelCreditMemoParams params = new CancelCreditMemoParams(creditMemoId) .expand(expand) .headers(headers); return executeCancelCreditMemoAPICall(params).getData(); } /** * Cancel a credit memo * Cancels a credit memo. Only credit memos with the Draft status can be cancelled. * @param params CancelCreditMemoParams * @return CreditMemo * @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 CreditMemo cancel(CancelCreditMemoParams params) throws ApiException { return executeCancelCreditMemoAPICall(params).getData(); } public ApiResponse cancelWithHttpInfo(CancelCreditMemoParams params) throws ApiException { return executeCancelCreditMemoAPICall(params); } ApiResponse executeCancelCreditMemoAPICall(CancelCreditMemoParams params) throws ApiException { return cancelCreditMemoWithHttpInfo(params.creditMemoId, params.fields, params.creditMemoFields, params.appliedToFields, params.creditMemoItemsFields, params.taxationItemsFields, params.accountFields, params.billToFields, 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 createCreditMemoCall(CreditMemoCreateRequest creditMemoCreateRequest, List fields, List creditMemoFields, List appliedToFields, List creditMemoItemsFields, List taxationItemsFields, List accountFields, List billToFields, 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 = creditMemoCreateRequest; // create path and map variables String localVarPath = "/credit_memos"; 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 (creditMemoFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "credit_memo.fields[]", creditMemoFields)); } if (appliedToFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "applied_to.fields[]", appliedToFields)); } if (creditMemoItemsFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "credit_memo_items.fields[]", creditMemoItemsFields)); } if (taxationItemsFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "taxation_items.fields[]", taxationItemsFields)); } if (accountFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "account.fields[]", accountFields)); } if (billToFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "bill_to.fields[]", billToFields)); } 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 createCreditMemoValidateBeforeCall(CreditMemoCreateRequest creditMemoCreateRequest, List fields, List creditMemoFields, List appliedToFields, List creditMemoItemsFields, List taxationItemsFields, List accountFields, List billToFields, 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 'creditMemoCreateRequest' is set if (creditMemoCreateRequest == null) { throw new ApiException("Missing the required parameter 'creditMemoCreateRequest' when calling createCreditMemo(Async)"); } return createCreditMemoCall(creditMemoCreateRequest, fields, creditMemoFields, appliedToFields, creditMemoItemsFields, taxationItemsFields, accountFields, billToFields, expand, filter, pageSize, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback); } private ApiResponse createCreditMemoWithHttpInfo(CreditMemoCreateRequest creditMemoCreateRequest, List fields, List creditMemoFields, List appliedToFields, List creditMemoItemsFields, List taxationItemsFields, List accountFields, List billToFields, 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 = createCreditMemoValidateBeforeCall(creditMemoCreateRequest, fields, creditMemoFields, appliedToFields, creditMemoItemsFields, taxationItemsFields, accountFields, billToFields, 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 createCreditMemoAsync(CreditMemoCreateRequest creditMemoCreateRequest, List fields, List creditMemoFields, List appliedToFields, List creditMemoItemsFields, List taxationItemsFields, List accountFields, List billToFields, 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 = createCreditMemoValidateBeforeCall(creditMemoCreateRequest, fields, creditMemoFields, appliedToFields, creditMemoItemsFields, taxationItemsFields, accountFields, billToFields, 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 CreateCreditMemoParams { private final CreditMemoCreateRequest creditMemoCreateRequest; private Headers headers; /* * Check for list params */ private GetByIdQueryParams getByIdQueryParams; private List fields; private List creditMemoFields; private List appliedToFields; private List creditMemoItemsFields; private List taxationItemsFields; private List accountFields; private List billToFields; 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 CreateCreditMemoParams(CreditMemoCreateRequest creditMemoCreateRequest) { this.creditMemoCreateRequest = creditMemoCreateRequest; } /** * Set getByIdQueryParams * @param getByIdQueryParams GetByIdQueryParams * @return CreateCreditMemoParams */ public CreateCreditMemoParams 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 CreateCreditMemoParams */ public CreateCreditMemoParams 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`, `credit_memo_number`, `state_transitions`, `description`, `account_id`, `total`, `subtotal`, `tax`, `document_date`, `exclude_from_auto_apply_rules`, `posted_by_id`, `state`, `balance`, `invoice_id`, `reason_code`, `amount_refunded`, `bill_to_id`, `billing_document_settings`, `currency` </details> (optional) * @return CreateCreditMemoParams */ public CreateCreditMemoParams fields(List fields) { this.fields = fields; return this; } /** * Set creditMemoFields * @param creditMemoFields 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`, `credit_memo_number`, `state_transitions`, `description`, `account_id`, `total`, `subtotal`, `tax`, `document_date`, `exclude_from_auto_apply_rules`, `posted_by_id`, `state`, `balance`, `invoice_id`, `reason_code`, `amount_refunded`, `bill_to_id`, `billing_document_settings`, `currency` </details> (optional) * @return CreateCreditMemoParams */ public CreateCreditMemoParams creditMemoFields(List creditMemoFields) { this.creditMemoFields = creditMemoFields; return this; } /** * Set appliedToFields * @param appliedToFields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `id`, `amount`, `billing_document_id`, `billing_document_type` </details> (optional) * @return CreateCreditMemoParams */ public CreateCreditMemoParams appliedToFields(List appliedToFields) { this.appliedToFields = appliedToFields; return this; } /** * Set creditMemoItemsFields * @param creditMemoItemsFields 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`, `applied_to_item_id`, `price_id`, `discount_item`, `deferred_revenue_account`, `description`, `credit_memo_id`, `sku`, `name`, `purchase_order_number`, `quantity`, `recognized_revenue_account`, `remaining_balance`, `revenue_recognition_rule_name`, `service_end`, `service_start`, `accounts_receivable_account`, `on_account_account`, `subscription_id`, `subscription_item_id`, `tax`, `tax_code`, `tax_inclusive`, `unit_amount`, `unit_of_measure`, `subtotal`, `invoice_item_id`, `document_item_date` </details> (optional) * @return CreateCreditMemoParams */ public CreateCreditMemoParams creditMemoItemsFields(List creditMemoItemsFields) { this.creditMemoItemsFields = creditMemoItemsFields; return this; } /** * Set taxationItemsFields * @param taxationItemsFields 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`, `amount_exempt`, `tax_date`, `jurisdiction`, `location_code`, `name`, `sales_tax_payable_account`, `tax_code`, `tax_code_name`, `tax_rate`, `tax_rate_name`, `tax_inclusive`, `tax_rate_type`, `source_tax_item_id`, `amount_applied`, `amount_refunded`, `on_account_account` </details> (optional) * @return CreateCreditMemoParams */ public CreateCreditMemoParams taxationItemsFields(List taxationItemsFields) { this.taxationItemsFields = taxationItemsFields; return this; } /** * Set accountFields * @param accountFields 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`, `auto_pay`, `account_number`, `bill_to_id`, `sold_to_id`, `billing_document_settings`, `communication_profile_id`, `crm_id`, `sales_rep`, `parent_account_id`, `payment_gateway`, `payment_terms`, `remaining_credit_memo_balance`, `remaining_debit_memo_balance`, `remaining_invoice_balance`, `remaining_payment_balance`, `sequence_set_id`, `tax_certificate`, `batch`, `tax_identifier`, `bill_cycle_day`, `description`, `name`, `currency`, `default_payment_method_id`, `enabled`, `organization_id` </details> (optional) * @return CreateCreditMemoParams */ public CreateCreditMemoParams accountFields(List accountFields) { this.accountFields = accountFields; return this; } /** * Set billToFields * @param billToFields 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`, `address`, `home_phone`, `first_name`, `last_name`, `email`, `work_email`, `nickname`, `other_phone`, `work_phone`, `mobile_phone`, `tax_region`, `other_phone_type`, `fax` </details> (optional) * @return CreateCreditMemoParams */ public CreateCreditMemoParams billToFields(List billToFields) { this.billToFields = billToFields; 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 CreateCreditMemoParams */ public CreateCreditMemoParams 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 CreateCreditMemoParams */ public CreateCreditMemoParams 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 CreateCreditMemoParams */ public CreateCreditMemoParams pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } } /** * Create a credit memo * Creates a new credit memo. * @param creditMemoCreateRequest (required) * @return CreditMemo * @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 CreateCreditMemoParams createCreditMemoParams(CreditMemoCreateRequest creditMemoCreateRequest) { return new CreateCreditMemoParams(creditMemoCreateRequest); } public CreditMemo createCreditMemo(CreditMemoCreateRequest creditMemoCreateRequest) throws ApiException { CreateCreditMemoParams params = new CreateCreditMemoParams(creditMemoCreateRequest); return executeCreateCreditMemoAPICall(params).getData(); } /** * Expose HTTP info public ApiResponse createCreditMemoWithHttpInfo(CreditMemoCreateRequest creditMemoCreateRequest) throws ApiException { CreateCreditMemoParams params = new CreateCreditMemoParams(creditMemoCreateRequest); return executeCreateCreditMemoAPICall(params); } **/ /** Legacy Query Params Requests **/ public CreditMemo createCreditMemo( CreditMemoCreateRequest creditMemoCreateRequest , List expand) throws ApiException { CreateCreditMemoParams params = new CreateCreditMemoParams(creditMemoCreateRequest); params.expand(expand); return executeCreateCreditMemoAPICall(params).getData(); } /* * add header methods */ public CreditMemo createCreditMemo(CreditMemoCreateRequest creditMemoCreateRequest ,List expand,Headers headers) throws ApiException { CreateCreditMemoParams params = new CreateCreditMemoParams(creditMemoCreateRequest) .expand(expand) .headers(headers); return executeCreateCreditMemoAPICall(params).getData(); } /** * Create a credit memo * Creates a new credit memo. * @param params CreateCreditMemoParams * @return CreditMemo * @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 CreditMemo create(CreateCreditMemoParams params) throws ApiException { return executeCreateCreditMemoAPICall(params).getData(); } public ApiResponse createWithHttpInfo(CreateCreditMemoParams params) throws ApiException { return executeCreateCreditMemoAPICall(params); } ApiResponse executeCreateCreditMemoAPICall(CreateCreditMemoParams params) throws ApiException { return createCreditMemoWithHttpInfo(params.creditMemoCreateRequest, params.fields, params.creditMemoFields, params.appliedToFields, params.creditMemoItemsFields, params.taxationItemsFields, params.accountFields, params.billToFields, 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 deleteCreditMemoCall(String creditMemoId, 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 = "/credit_memos/{credit_memo_id}" .replace("{" + "credit_memo_id" + "}", localVarApiClient.escapeString(creditMemoId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (zuoraTrackId != null) { localVarHeaderParams.put("zuora-track-id", localVarApiClient.parameterToString(zuoraTrackId)); } if (async != null) { localVarHeaderParams.put("async", localVarApiClient.parameterToString(async)); } if (zuoraCacheEnabled != null) { localVarHeaderParams.put("zuora-cache-enabled", localVarApiClient.parameterToString(zuoraCacheEnabled)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("zuora-entity-ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (idempotencyKey != null) { localVarHeaderParams.put("idempotency-key", localVarApiClient.parameterToString(idempotencyKey)); } if (acceptEncoding != null) { localVarHeaderParams.put("accept-encoding", localVarApiClient.parameterToString(acceptEncoding)); } if (contentEncoding != null) { localVarHeaderParams.put("content-encoding", localVarApiClient.parameterToString(contentEncoding)); } if (zuoraOrgIds != null) { localVarHeaderParams.put("zuora-org-ids", localVarApiClient.parameterToString(zuoraOrgIds)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteCreditMemoValidateBeforeCall(String creditMemoId, 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 'creditMemoId' is set if (creditMemoId == null) { throw new ApiException("Missing the required parameter 'creditMemoId' when calling deleteCreditMemo(Async)"); } return deleteCreditMemoCall(creditMemoId, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback); } private ApiResponse deleteCreditMemoWithHttpInfo(String creditMemoId, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds) throws ApiException { okhttp3.Call localVarCall = deleteCreditMemoValidateBeforeCall(creditMemoId, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, null); return localVarApiClient.execute(localVarCall); } private okhttp3.Call deleteCreditMemoAsync(String creditMemoId, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteCreditMemoValidateBeforeCall(creditMemoId, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } public static class DeleteCreditMemoParams { private final String creditMemoId; private Headers headers; /* * Check for list params */ private GetByIdQueryParams getByIdQueryParams; private String zuoraTrackId; private Boolean async; private Boolean zuoraCacheEnabled; private String zuoraEntityIds; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraOrgIds; public DeleteCreditMemoParams(String creditMemoId) { this.creditMemoId = creditMemoId; } /** * Set headers * @param headers Headers * @return DeleteCreditMemoParams */ public DeleteCreditMemoParams headers(Headers headers) { this.headers = headers; if (headers.getZuoraTrackId() != null) { this.zuoraTrackId = headers.getZuoraTrackId(); } if (headers.getAsync() != null) { this.async = headers.getAsync(); } if (headers.getZuoraCacheEnabled() != null) { this.zuoraCacheEnabled = headers.getZuoraCacheEnabled(); } if (headers.getZuoraEntityIds() != null) { this.zuoraEntityIds = headers.getZuoraEntityIds(); } if (headers.getIdempotencyKey() != null) { this.idempotencyKey = headers.getIdempotencyKey(); } if (headers.getAcceptEncoding() != null) { this.acceptEncoding = headers.getAcceptEncoding(); } if (headers.getContentEncoding() != null) { this.contentEncoding = headers.getContentEncoding(); } if (headers.getZuoraOrgIds() != null) { this.zuoraOrgIds = headers.getZuoraOrgIds(); } return this; } } /** * Delete a credit memo * Permanently deletes a credit memo. This operation cannot be undone once it is performed. * @param creditMemoId Identifier for the credit memo, either `credit_memo_number` or `credit_memo_id` (required) * @return * @http.response.details
Status Code Description Response Headers
204 Default Response * ratelimit-limit - The request limit quota for the time window closest to exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* ratelimit-remaining - The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* ratelimit-reset - The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* zuora-request-id - Zuora’s internal identifier for this request.
* zuora-track-id - A user-supplied identifier for this request. If you supply a `zuora-track-id` as a request header, Zuora returns the `zuora-track-id` as a response header.
400 Bad Request -
401 Unauthorized -
404 Not Found -
405 Method Not Allowed -
429 Too Many Requests -
500 Internal Server Error -
502 Bad Gateway -
503 Service Unavailable -
504 Gateway Timeout -
*/ public DeleteCreditMemoParams deleteCreditMemoParams(String creditMemoId) { return new DeleteCreditMemoParams(creditMemoId); } public void deleteCreditMemo(String creditMemoId) throws ApiException { DeleteCreditMemoParams params = new DeleteCreditMemoParams(creditMemoId); executeDeleteCreditMemoAPICall(params); } /** * Expose HTTP info public ApiResponse deleteCreditMemoWithHttpInfo(String creditMemoId) throws ApiException { DeleteCreditMemoParams params = new DeleteCreditMemoParams(creditMemoId); return executeDeleteCreditMemoAPICall(params); } **/ /** Legacy Query Params Requests **/ /* * add header methods */ public void deleteCreditMemo(String creditMemoId ,Headers headers) throws ApiException { DeleteCreditMemoParams params = new DeleteCreditMemoParams(creditMemoId) .headers(headers); executeDeleteCreditMemoAPICall(params); } /** * Delete a credit memo * Permanently deletes a credit memo. This operation cannot be undone once it is performed. * @param params DeleteCreditMemoParams * @return * @http.response.details
Status Code Description Response Headers
204 Default Response * ratelimit-limit - The request limit quota for the time window closest to exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* ratelimit-remaining - The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* ratelimit-reset - The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* zuora-request-id - Zuora’s internal identifier for this request.
* zuora-track-id - A user-supplied identifier for this request. If you supply a `zuora-track-id` as a request header, Zuora returns the `zuora-track-id` as a response header.
400 Bad Request -
401 Unauthorized -
404 Not Found -
405 Method Not Allowed -
429 Too Many Requests -
500 Internal Server Error -
502 Bad Gateway -
503 Service Unavailable -
504 Gateway Timeout -
*/ public void delete(DeleteCreditMemoParams params) throws ApiException { executeDeleteCreditMemoAPICall(params).getData(); } public ApiResponse deleteWithHttpInfo(DeleteCreditMemoParams params) throws ApiException { return executeDeleteCreditMemoAPICall(params); } ApiResponse executeDeleteCreditMemoAPICall(DeleteCreditMemoParams params) throws ApiException { return deleteCreditMemoWithHttpInfo(params.creditMemoId, params.zuoraTrackId, params.async, params.zuoraCacheEnabled, params.zuoraEntityIds, params.idempotencyKey, params.acceptEncoding, params.contentEncoding, params.zuoraOrgIds); } private okhttp3.Call getCreditMemoCall(String creditMemoId, List fields, List creditMemoFields, List appliedToFields, List creditMemoItemsFields, List taxationItemsFields, List accountFields, List billToFields, 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 = "/credit_memos/{credit_memo_id}" .replace("{" + "credit_memo_id" + "}", localVarApiClient.escapeString(creditMemoId.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 (creditMemoFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "credit_memo.fields[]", creditMemoFields)); } if (appliedToFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "applied_to.fields[]", appliedToFields)); } if (creditMemoItemsFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "credit_memo_items.fields[]", creditMemoItemsFields)); } if (taxationItemsFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "taxation_items.fields[]", taxationItemsFields)); } if (accountFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "account.fields[]", accountFields)); } if (billToFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "bill_to.fields[]", billToFields)); } 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 getCreditMemoValidateBeforeCall(String creditMemoId, List fields, List creditMemoFields, List appliedToFields, List creditMemoItemsFields, List taxationItemsFields, List accountFields, List billToFields, 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 'creditMemoId' is set if (creditMemoId == null) { throw new ApiException("Missing the required parameter 'creditMemoId' when calling getCreditMemo(Async)"); } return getCreditMemoCall(creditMemoId, fields, creditMemoFields, appliedToFields, creditMemoItemsFields, taxationItemsFields, accountFields, billToFields, expand, filter, pageSize, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback); } private ApiResponse getCreditMemoWithHttpInfo(String creditMemoId, List fields, List creditMemoFields, List appliedToFields, List creditMemoItemsFields, List taxationItemsFields, List accountFields, List billToFields, 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 = getCreditMemoValidateBeforeCall(creditMemoId, fields, creditMemoFields, appliedToFields, creditMemoItemsFields, taxationItemsFields, accountFields, billToFields, 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 getCreditMemoAsync(String creditMemoId, List fields, List creditMemoFields, List appliedToFields, List creditMemoItemsFields, List taxationItemsFields, List accountFields, List billToFields, 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 = getCreditMemoValidateBeforeCall(creditMemoId, fields, creditMemoFields, appliedToFields, creditMemoItemsFields, taxationItemsFields, accountFields, billToFields, 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 GetCreditMemoParams { private final String creditMemoId; private Headers headers; /* * Check for list params */ private GetByIdQueryParams getByIdQueryParams; private List fields; private List creditMemoFields; private List appliedToFields; private List creditMemoItemsFields; private List taxationItemsFields; private List accountFields; private List billToFields; 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 GetCreditMemoParams(String creditMemoId) { this.creditMemoId = creditMemoId; } /** * Set getByIdQueryParams * @param getByIdQueryParams GetByIdQueryParams * @return GetCreditMemoParams */ public GetCreditMemoParams 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 GetCreditMemoParams */ public GetCreditMemoParams 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`, `credit_memo_number`, `state_transitions`, `description`, `account_id`, `total`, `subtotal`, `tax`, `document_date`, `exclude_from_auto_apply_rules`, `posted_by_id`, `state`, `balance`, `invoice_id`, `reason_code`, `amount_refunded`, `bill_to_id`, `billing_document_settings`, `currency` </details> (optional) * @return GetCreditMemoParams */ public GetCreditMemoParams fields(List fields) { this.fields = fields; return this; } /** * Set creditMemoFields * @param creditMemoFields 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`, `credit_memo_number`, `state_transitions`, `description`, `account_id`, `total`, `subtotal`, `tax`, `document_date`, `exclude_from_auto_apply_rules`, `posted_by_id`, `state`, `balance`, `invoice_id`, `reason_code`, `amount_refunded`, `bill_to_id`, `billing_document_settings`, `currency` </details> (optional) * @return GetCreditMemoParams */ public GetCreditMemoParams creditMemoFields(List creditMemoFields) { this.creditMemoFields = creditMemoFields; return this; } /** * Set appliedToFields * @param appliedToFields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `id`, `amount`, `billing_document_id`, `billing_document_type` </details> (optional) * @return GetCreditMemoParams */ public GetCreditMemoParams appliedToFields(List appliedToFields) { this.appliedToFields = appliedToFields; return this; } /** * Set creditMemoItemsFields * @param creditMemoItemsFields 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`, `applied_to_item_id`, `price_id`, `discount_item`, `deferred_revenue_account`, `description`, `credit_memo_id`, `sku`, `name`, `purchase_order_number`, `quantity`, `recognized_revenue_account`, `remaining_balance`, `revenue_recognition_rule_name`, `service_end`, `service_start`, `accounts_receivable_account`, `on_account_account`, `subscription_id`, `subscription_item_id`, `tax`, `tax_code`, `tax_inclusive`, `unit_amount`, `unit_of_measure`, `subtotal`, `invoice_item_id`, `document_item_date` </details> (optional) * @return GetCreditMemoParams */ public GetCreditMemoParams creditMemoItemsFields(List creditMemoItemsFields) { this.creditMemoItemsFields = creditMemoItemsFields; return this; } /** * Set taxationItemsFields * @param taxationItemsFields 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`, `amount_exempt`, `tax_date`, `jurisdiction`, `location_code`, `name`, `sales_tax_payable_account`, `tax_code`, `tax_code_name`, `tax_rate`, `tax_rate_name`, `tax_inclusive`, `tax_rate_type`, `source_tax_item_id`, `amount_applied`, `amount_refunded`, `on_account_account` </details> (optional) * @return GetCreditMemoParams */ public GetCreditMemoParams taxationItemsFields(List taxationItemsFields) { this.taxationItemsFields = taxationItemsFields; return this; } /** * Set accountFields * @param accountFields 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`, `auto_pay`, `account_number`, `bill_to_id`, `sold_to_id`, `billing_document_settings`, `communication_profile_id`, `crm_id`, `sales_rep`, `parent_account_id`, `payment_gateway`, `payment_terms`, `remaining_credit_memo_balance`, `remaining_debit_memo_balance`, `remaining_invoice_balance`, `remaining_payment_balance`, `sequence_set_id`, `tax_certificate`, `batch`, `tax_identifier`, `bill_cycle_day`, `description`, `name`, `currency`, `default_payment_method_id`, `enabled`, `organization_id` </details> (optional) * @return GetCreditMemoParams */ public GetCreditMemoParams accountFields(List accountFields) { this.accountFields = accountFields; return this; } /** * Set billToFields * @param billToFields 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`, `address`, `home_phone`, `first_name`, `last_name`, `email`, `work_email`, `nickname`, `other_phone`, `work_phone`, `mobile_phone`, `tax_region`, `other_phone_type`, `fax` </details> (optional) * @return GetCreditMemoParams */ public GetCreditMemoParams billToFields(List billToFields) { this.billToFields = billToFields; 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 GetCreditMemoParams */ public GetCreditMemoParams 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 GetCreditMemoParams */ public GetCreditMemoParams 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 GetCreditMemoParams */ public GetCreditMemoParams pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } } /** * Retrieve a credit memo * Retrieves the credit memo with the given ID. * @param creditMemoId Identifier for the credit memo, either `credit_memo_number` or `credit_memo_id` (required) * @return CreditMemo * @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 GetCreditMemoParams getCreditMemoParams(String creditMemoId) { return new GetCreditMemoParams(creditMemoId); } public CreditMemo getCreditMemo(String creditMemoId) throws ApiException { GetCreditMemoParams params = new GetCreditMemoParams(creditMemoId); return executeGetCreditMemoAPICall(params).getData(); } /** * Expose HTTP info public ApiResponse getCreditMemoWithHttpInfo(String creditMemoId) throws ApiException { GetCreditMemoParams params = new GetCreditMemoParams(creditMemoId); return executeGetCreditMemoAPICall(params); } **/ /** Legacy Query Params Requests **/ public CreditMemo getCreditMemo( String creditMemoId , List expand) throws ApiException { GetCreditMemoParams params = new GetCreditMemoParams(creditMemoId); params.expand(expand); return executeGetCreditMemoAPICall(params).getData(); } /* * add header methods */ public CreditMemo getCreditMemo(String creditMemoId ,List expand,Headers headers) throws ApiException { GetCreditMemoParams params = new GetCreditMemoParams(creditMemoId) .expand(expand) .headers(headers); return executeGetCreditMemoAPICall(params).getData(); } /** * Retrieve a credit memo * Retrieves the credit memo with the given ID. * @param params GetCreditMemoParams * @return CreditMemo * @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 CreditMemo get(GetCreditMemoParams params) throws ApiException { return executeGetCreditMemoAPICall(params).getData(); } public ApiResponse getWithHttpInfo(GetCreditMemoParams params) throws ApiException { return executeGetCreditMemoAPICall(params); } ApiResponse executeGetCreditMemoAPICall(GetCreditMemoParams params) throws ApiException { return getCreditMemoWithHttpInfo(params.creditMemoId, params.fields, params.creditMemoFields, params.appliedToFields, params.creditMemoItemsFields, params.taxationItemsFields, params.accountFields, params.billToFields, 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 getCreditMemoItemsCall(String cursor, List expand, List filter, List sort, Integer pageSize, List fields, List creditMemoItemFields, List taxationItemsFields, List creditMemoFields, 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 = "/credit_memo_items"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_size", pageSize)); } if (fields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "fields[]", fields)); } if (creditMemoItemFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "credit_memo_item.fields[]", creditMemoItemFields)); } if (taxationItemsFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "taxation_items.fields[]", taxationItemsFields)); } if (creditMemoFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "credit_memo.fields[]", creditMemoFields)); } 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 getCreditMemoItemsValidateBeforeCall(String cursor, List expand, List filter, List sort, Integer pageSize, List fields, List creditMemoItemFields, List taxationItemsFields, List creditMemoFields, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { return getCreditMemoItemsCall(cursor, expand, filter, sort, pageSize, fields, creditMemoItemFields, taxationItemsFields, creditMemoFields, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback); } private ApiResponse getCreditMemoItemsWithHttpInfo(String cursor, List expand, List filter, List sort, Integer pageSize, List fields, List creditMemoItemFields, List taxationItemsFields, List creditMemoFields, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds) throws ApiException { okhttp3.Call localVarCall = getCreditMemoItemsValidateBeforeCall(cursor, expand, filter, sort, pageSize, fields, creditMemoItemFields, taxationItemsFields, creditMemoFields, 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 getCreditMemoItemsAsync(String cursor, List expand, List filter, List sort, Integer pageSize, List fields, List creditMemoItemFields, List taxationItemsFields, List creditMemoFields, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getCreditMemoItemsValidateBeforeCall(cursor, expand, filter, sort, pageSize, fields, creditMemoItemFields, taxationItemsFields, creditMemoFields, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public static class GetCreditMemoItemsParams { private Headers headers; /* * Check for list params */ private ListQueryParams listQueryParams; private String cursor; private List expand; private List filter; private List sort; private Integer pageSize; private List fields; private List creditMemoItemFields; private List taxationItemsFields; private List creditMemoFields; 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 GetCreditMemoItemsParams() { } /** * Set listQueryParams * @param listQueryParams ListQueryParams * @return GetCreditMemoItemsParams */ public GetCreditMemoItemsParams listQueryParams(ListQueryParams listQueryParams) { this.listQueryParams = listQueryParams; if (cursor != null) { this.cursor = listQueryParams.getCursor(); } if (expand != null) { this.expand = listQueryParams.getExpand(); } if (filter != null) { this.filter = listQueryParams.getFilter(); } if (sort != null) { this.sort = listQueryParams.getSort(); } if (pageSize != null) { this.pageSize = listQueryParams.getPageSize(); } return this; } /** * Set headers * @param headers Headers * @return GetCreditMemoItemsParams */ public GetCreditMemoItemsParams 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 cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return GetCreditMemoItemsParams */ public GetCreditMemoItemsParams cursor(String cursor) { this.cursor = cursor; 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 GetCreditMemoItemsParams */ public GetCreditMemoItemsParams 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 Tutorials for detailed instructions. (optional) * @return GetCreditMemoItemsParams */ public GetCreditMemoItemsParams filter(List filter) { this.filter = filter; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `account_number.asc`) or descending (e.g. `account_number.desc`). You cannot sort on properties that are arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return GetCreditMemoItemsParams */ public GetCreditMemoItemsParams sort(List sort) { this.sort = sort; 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 GetCreditMemoItemsParams */ public GetCreditMemoItemsParams pageSize(Integer pageSize) { this.pageSize = pageSize; 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`, `amount`, `applied_to_item_id`, `price_id`, `discount_item`, `deferred_revenue_account`, `description`, `credit_memo_id`, `sku`, `name`, `purchase_order_number`, `quantity`, `recognized_revenue_account`, `remaining_balance`, `revenue_recognition_rule_name`, `service_end`, `service_start`, `accounts_receivable_account`, `on_account_account`, `subscription_id`, `subscription_item_id`, `tax`, `tax_code`, `tax_inclusive`, `unit_amount`, `unit_of_measure`, `subtotal`, `invoice_item_id`, `document_item_date` </details> (optional) * @return GetCreditMemoItemsParams */ public GetCreditMemoItemsParams fields(List fields) { this.fields = fields; return this; } /** * Set creditMemoItemFields * @param creditMemoItemFields 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`, `applied_to_item_id`, `price_id`, `discount_item`, `deferred_revenue_account`, `description`, `credit_memo_id`, `sku`, `name`, `purchase_order_number`, `quantity`, `recognized_revenue_account`, `remaining_balance`, `revenue_recognition_rule_name`, `service_end`, `service_start`, `accounts_receivable_account`, `on_account_account`, `subscription_id`, `subscription_item_id`, `tax`, `tax_code`, `tax_inclusive`, `unit_amount`, `unit_of_measure`, `subtotal`, `invoice_item_id`, `document_item_date` </details> (optional) * @return GetCreditMemoItemsParams */ public GetCreditMemoItemsParams creditMemoItemFields(List creditMemoItemFields) { this.creditMemoItemFields = creditMemoItemFields; return this; } /** * Set taxationItemsFields * @param taxationItemsFields 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`, `amount_exempt`, `tax_date`, `jurisdiction`, `location_code`, `name`, `sales_tax_payable_account`, `tax_code`, `tax_code_name`, `tax_rate`, `tax_rate_name`, `tax_inclusive`, `tax_rate_type`, `source_tax_item_id`, `amount_applied`, `amount_refunded`, `on_account_account` </details> (optional) * @return GetCreditMemoItemsParams */ public GetCreditMemoItemsParams taxationItemsFields(List taxationItemsFields) { this.taxationItemsFields = taxationItemsFields; return this; } /** * Set creditMemoFields * @param creditMemoFields 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`, `credit_memo_number`, `state_transitions`, `description`, `account_id`, `total`, `subtotal`, `tax`, `document_date`, `exclude_from_auto_apply_rules`, `posted_by_id`, `state`, `balance`, `invoice_id`, `reason_code`, `amount_refunded`, `bill_to_id`, `billing_document_settings`, `currency` </details> (optional) * @return GetCreditMemoItemsParams */ public GetCreditMemoItemsParams creditMemoFields(List creditMemoFields) { this.creditMemoFields = creditMemoFields; return this; } } /** * List credit memo items * Retrieves information about all items of credit memos. A credit memo item is a single line item in a credit memo. * @return CreditMemoItemListResponse * @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 GetCreditMemoItemsParams getCreditMemoItemsParams() { return new GetCreditMemoItemsParams(); } public CreditMemoItemListResponse getCreditMemoItems() throws ApiException { GetCreditMemoItemsParams params = new GetCreditMemoItemsParams(); return executeGetCreditMemoItemsAPICall(params).getData(); } /** * Expose HTTP info public ApiResponse getCreditMemoItemsWithHttpInfo() throws ApiException { GetCreditMemoItemsParams params = new GetCreditMemoItemsParams(); return executeGetCreditMemoItemsAPICall(params); } **/ /** Legacy Query Params Requests **/ public CreditMemoItemListResponse getCreditMemoItems(String cursor, List expand, List filter) throws ApiException { GetCreditMemoItemsParams params = new GetCreditMemoItemsParams(); params.cursor(cursor); params.expand(expand); params.filter(filter); return executeGetCreditMemoItemsAPICall(params).getData(); } /* * add header methods */ public CreditMemoItemListResponse getCreditMemoItems(String cursor,List expand,List filter,Headers headers) throws ApiException { GetCreditMemoItemsParams params = new GetCreditMemoItemsParams() .cursor(cursor) .expand(expand) .filter(filter) .headers(headers); return executeGetCreditMemoItemsAPICall(params).getData(); } /** * List credit memo items * Retrieves information about all items of credit memos. A credit memo item is a single line item in a credit memo. * @param params GetCreditMemoItemsParams * @return CreditMemoItemListResponse * @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 CreditMemoItemListResponse list(GetCreditMemoItemsParams params) throws ApiException { return executeGetCreditMemoItemsAPICall(params).getData(); } public ApiResponse listWithHttpInfo(GetCreditMemoItemsParams params) throws ApiException { return executeGetCreditMemoItemsAPICall(params); } ApiResponse executeGetCreditMemoItemsAPICall(GetCreditMemoItemsParams params) throws ApiException { return getCreditMemoItemsWithHttpInfo(params.cursor, params.expand, params.filter, params.sort, params.pageSize, params.fields, params.creditMemoItemFields, params.taxationItemsFields, params.creditMemoFields, params.zuoraTrackId, params.async, params.zuoraCacheEnabled, params.zuoraEntityIds, params.idempotencyKey, params.acceptEncoding, params.contentEncoding, params.zuoraOrgIds); } private okhttp3.Call getCreditMemosCall(String cursor, List expand, List filter, List sort, Integer pageSize, List fields, List creditMemoFields, List appliedToFields, List creditMemoItemsFields, List taxationItemsFields, List accountFields, List billToFields, 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 = "/credit_memos"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_size", pageSize)); } if (fields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "fields[]", fields)); } if (creditMemoFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "credit_memo.fields[]", creditMemoFields)); } if (appliedToFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "applied_to.fields[]", appliedToFields)); } if (creditMemoItemsFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "credit_memo_items.fields[]", creditMemoItemsFields)); } if (taxationItemsFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "taxation_items.fields[]", taxationItemsFields)); } if (accountFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "account.fields[]", accountFields)); } if (billToFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "bill_to.fields[]", billToFields)); } 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 getCreditMemosValidateBeforeCall(String cursor, List expand, List filter, List sort, Integer pageSize, List fields, List creditMemoFields, List appliedToFields, List creditMemoItemsFields, List taxationItemsFields, List accountFields, List billToFields, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { return getCreditMemosCall(cursor, expand, filter, sort, pageSize, fields, creditMemoFields, appliedToFields, creditMemoItemsFields, taxationItemsFields, accountFields, billToFields, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback); } private ApiResponse getCreditMemosWithHttpInfo(String cursor, List expand, List filter, List sort, Integer pageSize, List fields, List creditMemoFields, List appliedToFields, List creditMemoItemsFields, List taxationItemsFields, List accountFields, List billToFields, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds) throws ApiException { okhttp3.Call localVarCall = getCreditMemosValidateBeforeCall(cursor, expand, filter, sort, pageSize, fields, creditMemoFields, appliedToFields, creditMemoItemsFields, taxationItemsFields, accountFields, billToFields, 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 getCreditMemosAsync(String cursor, List expand, List filter, List sort, Integer pageSize, List fields, List creditMemoFields, List appliedToFields, List creditMemoItemsFields, List taxationItemsFields, List accountFields, List billToFields, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getCreditMemosValidateBeforeCall(cursor, expand, filter, sort, pageSize, fields, creditMemoFields, appliedToFields, creditMemoItemsFields, taxationItemsFields, accountFields, billToFields, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public static class GetCreditMemosParams { private Headers headers; /* * Check for list params */ private ListQueryParams listQueryParams; private String cursor; private List expand; private List filter; private List sort; private Integer pageSize; private List fields; private List creditMemoFields; private List appliedToFields; private List creditMemoItemsFields; private List taxationItemsFields; private List accountFields; private List billToFields; 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 GetCreditMemosParams() { } /** * Set listQueryParams * @param listQueryParams ListQueryParams * @return GetCreditMemosParams */ public GetCreditMemosParams listQueryParams(ListQueryParams listQueryParams) { this.listQueryParams = listQueryParams; if (cursor != null) { this.cursor = listQueryParams.getCursor(); } if (expand != null) { this.expand = listQueryParams.getExpand(); } if (filter != null) { this.filter = listQueryParams.getFilter(); } if (sort != null) { this.sort = listQueryParams.getSort(); } if (pageSize != null) { this.pageSize = listQueryParams.getPageSize(); } return this; } /** * Set headers * @param headers Headers * @return GetCreditMemosParams */ public GetCreditMemosParams 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 cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return GetCreditMemosParams */ public GetCreditMemosParams cursor(String cursor) { this.cursor = cursor; 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 GetCreditMemosParams */ public GetCreditMemosParams 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 Tutorials for detailed instructions. (optional) * @return GetCreditMemosParams */ public GetCreditMemosParams filter(List filter) { this.filter = filter; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `account_number.asc`) or descending (e.g. `account_number.desc`). You cannot sort on properties that are arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return GetCreditMemosParams */ public GetCreditMemosParams sort(List sort) { this.sort = sort; 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 GetCreditMemosParams */ public GetCreditMemosParams pageSize(Integer pageSize) { this.pageSize = pageSize; 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`, `credit_memo_number`, `state_transitions`, `description`, `account_id`, `total`, `subtotal`, `tax`, `document_date`, `exclude_from_auto_apply_rules`, `posted_by_id`, `state`, `balance`, `invoice_id`, `reason_code`, `amount_refunded`, `bill_to_id`, `billing_document_settings`, `currency` </details> (optional) * @return GetCreditMemosParams */ public GetCreditMemosParams fields(List fields) { this.fields = fields; return this; } /** * Set creditMemoFields * @param creditMemoFields 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`, `credit_memo_number`, `state_transitions`, `description`, `account_id`, `total`, `subtotal`, `tax`, `document_date`, `exclude_from_auto_apply_rules`, `posted_by_id`, `state`, `balance`, `invoice_id`, `reason_code`, `amount_refunded`, `bill_to_id`, `billing_document_settings`, `currency` </details> (optional) * @return GetCreditMemosParams */ public GetCreditMemosParams creditMemoFields(List creditMemoFields) { this.creditMemoFields = creditMemoFields; return this; } /** * Set appliedToFields * @param appliedToFields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `id`, `amount`, `billing_document_id`, `billing_document_type` </details> (optional) * @return GetCreditMemosParams */ public GetCreditMemosParams appliedToFields(List appliedToFields) { this.appliedToFields = appliedToFields; return this; } /** * Set creditMemoItemsFields * @param creditMemoItemsFields 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`, `applied_to_item_id`, `price_id`, `discount_item`, `deferred_revenue_account`, `description`, `credit_memo_id`, `sku`, `name`, `purchase_order_number`, `quantity`, `recognized_revenue_account`, `remaining_balance`, `revenue_recognition_rule_name`, `service_end`, `service_start`, `accounts_receivable_account`, `on_account_account`, `subscription_id`, `subscription_item_id`, `tax`, `tax_code`, `tax_inclusive`, `unit_amount`, `unit_of_measure`, `subtotal`, `invoice_item_id`, `document_item_date` </details> (optional) * @return GetCreditMemosParams */ public GetCreditMemosParams creditMemoItemsFields(List creditMemoItemsFields) { this.creditMemoItemsFields = creditMemoItemsFields; return this; } /** * Set taxationItemsFields * @param taxationItemsFields 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`, `amount_exempt`, `tax_date`, `jurisdiction`, `location_code`, `name`, `sales_tax_payable_account`, `tax_code`, `tax_code_name`, `tax_rate`, `tax_rate_name`, `tax_inclusive`, `tax_rate_type`, `source_tax_item_id`, `amount_applied`, `amount_refunded`, `on_account_account` </details> (optional) * @return GetCreditMemosParams */ public GetCreditMemosParams taxationItemsFields(List taxationItemsFields) { this.taxationItemsFields = taxationItemsFields; return this; } /** * Set accountFields * @param accountFields 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`, `auto_pay`, `account_number`, `bill_to_id`, `sold_to_id`, `billing_document_settings`, `communication_profile_id`, `crm_id`, `sales_rep`, `parent_account_id`, `payment_gateway`, `payment_terms`, `remaining_credit_memo_balance`, `remaining_debit_memo_balance`, `remaining_invoice_balance`, `remaining_payment_balance`, `sequence_set_id`, `tax_certificate`, `batch`, `tax_identifier`, `bill_cycle_day`, `description`, `name`, `currency`, `default_payment_method_id`, `enabled`, `organization_id` </details> (optional) * @return GetCreditMemosParams */ public GetCreditMemosParams accountFields(List accountFields) { this.accountFields = accountFields; return this; } /** * Set billToFields * @param billToFields 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`, `address`, `home_phone`, `first_name`, `last_name`, `email`, `work_email`, `nickname`, `other_phone`, `work_phone`, `mobile_phone`, `tax_region`, `other_phone_type`, `fax` </details> (optional) * @return GetCreditMemosParams */ public GetCreditMemosParams billToFields(List billToFields) { this.billToFields = billToFields; return this; } } /** * List credit memos * Returns a dictionary with a data property that contains an array of credit memos, starting after cursor. Each entry in the array is a separate credit memo object. If no more credit memos are available, the resulting array will be empty. This request should never return an error. * @return CreditMemoListResponse * @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 GetCreditMemosParams getCreditMemosParams() { return new GetCreditMemosParams(); } public CreditMemoListResponse getCreditMemos() throws ApiException { GetCreditMemosParams params = new GetCreditMemosParams(); return executeGetCreditMemosAPICall(params).getData(); } /** * Expose HTTP info public ApiResponse getCreditMemosWithHttpInfo() throws ApiException { GetCreditMemosParams params = new GetCreditMemosParams(); return executeGetCreditMemosAPICall(params); } **/ /** Legacy Query Params Requests **/ public CreditMemoListResponse getCreditMemos(String cursor, List expand, List filter) throws ApiException { GetCreditMemosParams params = new GetCreditMemosParams(); params.cursor(cursor); params.expand(expand); params.filter(filter); return executeGetCreditMemosAPICall(params).getData(); } /* * add header methods */ public CreditMemoListResponse getCreditMemos(String cursor,List expand,List filter,Headers headers) throws ApiException { GetCreditMemosParams params = new GetCreditMemosParams() .cursor(cursor) .expand(expand) .filter(filter) .headers(headers); return executeGetCreditMemosAPICall(params).getData(); } /** * List credit memos * Returns a dictionary with a data property that contains an array of credit memos, starting after cursor. Each entry in the array is a separate credit memo object. If no more credit memos are available, the resulting array will be empty. This request should never return an error. * @param params GetCreditMemosParams * @return CreditMemoListResponse * @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 CreditMemoListResponse list(GetCreditMemosParams params) throws ApiException { return executeGetCreditMemosAPICall(params).getData(); } public ApiResponse listWithHttpInfo(GetCreditMemosParams params) throws ApiException { return executeGetCreditMemosAPICall(params); } ApiResponse executeGetCreditMemosAPICall(GetCreditMemosParams params) throws ApiException { return getCreditMemosWithHttpInfo(params.cursor, params.expand, params.filter, params.sort, params.pageSize, params.fields, params.creditMemoFields, params.appliedToFields, params.creditMemoItemsFields, params.taxationItemsFields, params.accountFields, params.billToFields, params.zuoraTrackId, params.async, params.zuoraCacheEnabled, params.zuoraEntityIds, params.idempotencyKey, params.acceptEncoding, params.contentEncoding, params.zuoraOrgIds); } private okhttp3.Call patchCreditMemoCall(String creditMemoId, CreditMemoPatchRequest creditMemoPatchRequest, List fields, List creditMemoFields, List appliedToFields, List creditMemoItemsFields, List taxationItemsFields, List accountFields, List billToFields, 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 = creditMemoPatchRequest; // create path and map variables String localVarPath = "/credit_memos/{credit_memo_id}" .replace("{" + "credit_memo_id" + "}", localVarApiClient.escapeString(creditMemoId.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 (creditMemoFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "credit_memo.fields[]", creditMemoFields)); } if (appliedToFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "applied_to.fields[]", appliedToFields)); } if (creditMemoItemsFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "credit_memo_items.fields[]", creditMemoItemsFields)); } if (taxationItemsFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "taxation_items.fields[]", taxationItemsFields)); } if (accountFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "account.fields[]", accountFields)); } if (billToFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "bill_to.fields[]", billToFields)); } 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, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call patchCreditMemoValidateBeforeCall(String creditMemoId, CreditMemoPatchRequest creditMemoPatchRequest, List fields, List creditMemoFields, List appliedToFields, List creditMemoItemsFields, List taxationItemsFields, List accountFields, List billToFields, 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 'creditMemoId' is set if (creditMemoId == null) { throw new ApiException("Missing the required parameter 'creditMemoId' when calling patchCreditMemo(Async)"); } // verify the required parameter 'creditMemoPatchRequest' is set if (creditMemoPatchRequest == null) { throw new ApiException("Missing the required parameter 'creditMemoPatchRequest' when calling patchCreditMemo(Async)"); } return patchCreditMemoCall(creditMemoId, creditMemoPatchRequest, fields, creditMemoFields, appliedToFields, creditMemoItemsFields, taxationItemsFields, accountFields, billToFields, expand, filter, pageSize, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback); } private ApiResponse patchCreditMemoWithHttpInfo(String creditMemoId, CreditMemoPatchRequest creditMemoPatchRequest, List fields, List creditMemoFields, List appliedToFields, List creditMemoItemsFields, List taxationItemsFields, List accountFields, List billToFields, 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 = patchCreditMemoValidateBeforeCall(creditMemoId, creditMemoPatchRequest, fields, creditMemoFields, appliedToFields, creditMemoItemsFields, taxationItemsFields, accountFields, billToFields, 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 patchCreditMemoAsync(String creditMemoId, CreditMemoPatchRequest creditMemoPatchRequest, List fields, List creditMemoFields, List appliedToFields, List creditMemoItemsFields, List taxationItemsFields, List accountFields, List billToFields, 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 = patchCreditMemoValidateBeforeCall(creditMemoId, creditMemoPatchRequest, fields, creditMemoFields, appliedToFields, creditMemoItemsFields, taxationItemsFields, accountFields, billToFields, 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 PatchCreditMemoParams { private final String creditMemoId; private final CreditMemoPatchRequest creditMemoPatchRequest; private Headers headers; /* * Check for list params */ private GetByIdQueryParams getByIdQueryParams; private List fields; private List creditMemoFields; private List appliedToFields; private List creditMemoItemsFields; private List taxationItemsFields; private List accountFields; private List billToFields; 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 PatchCreditMemoParams(String creditMemoId, CreditMemoPatchRequest creditMemoPatchRequest) { this.creditMemoId = creditMemoId; this.creditMemoPatchRequest = creditMemoPatchRequest; } /** * Set getByIdQueryParams * @param getByIdQueryParams GetByIdQueryParams * @return PatchCreditMemoParams */ public PatchCreditMemoParams 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 PatchCreditMemoParams */ public PatchCreditMemoParams 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`, `credit_memo_number`, `state_transitions`, `description`, `account_id`, `total`, `subtotal`, `tax`, `document_date`, `exclude_from_auto_apply_rules`, `posted_by_id`, `state`, `balance`, `invoice_id`, `reason_code`, `amount_refunded`, `bill_to_id`, `billing_document_settings`, `currency` </details> (optional) * @return PatchCreditMemoParams */ public PatchCreditMemoParams fields(List fields) { this.fields = fields; return this; } /** * Set creditMemoFields * @param creditMemoFields 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`, `credit_memo_number`, `state_transitions`, `description`, `account_id`, `total`, `subtotal`, `tax`, `document_date`, `exclude_from_auto_apply_rules`, `posted_by_id`, `state`, `balance`, `invoice_id`, `reason_code`, `amount_refunded`, `bill_to_id`, `billing_document_settings`, `currency` </details> (optional) * @return PatchCreditMemoParams */ public PatchCreditMemoParams creditMemoFields(List creditMemoFields) { this.creditMemoFields = creditMemoFields; return this; } /** * Set appliedToFields * @param appliedToFields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `id`, `amount`, `billing_document_id`, `billing_document_type` </details> (optional) * @return PatchCreditMemoParams */ public PatchCreditMemoParams appliedToFields(List appliedToFields) { this.appliedToFields = appliedToFields; return this; } /** * Set creditMemoItemsFields * @param creditMemoItemsFields 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`, `applied_to_item_id`, `price_id`, `discount_item`, `deferred_revenue_account`, `description`, `credit_memo_id`, `sku`, `name`, `purchase_order_number`, `quantity`, `recognized_revenue_account`, `remaining_balance`, `revenue_recognition_rule_name`, `service_end`, `service_start`, `accounts_receivable_account`, `on_account_account`, `subscription_id`, `subscription_item_id`, `tax`, `tax_code`, `tax_inclusive`, `unit_amount`, `unit_of_measure`, `subtotal`, `invoice_item_id`, `document_item_date` </details> (optional) * @return PatchCreditMemoParams */ public PatchCreditMemoParams creditMemoItemsFields(List creditMemoItemsFields) { this.creditMemoItemsFields = creditMemoItemsFields; return this; } /** * Set taxationItemsFields * @param taxationItemsFields 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`, `amount_exempt`, `tax_date`, `jurisdiction`, `location_code`, `name`, `sales_tax_payable_account`, `tax_code`, `tax_code_name`, `tax_rate`, `tax_rate_name`, `tax_inclusive`, `tax_rate_type`, `source_tax_item_id`, `amount_applied`, `amount_refunded`, `on_account_account` </details> (optional) * @return PatchCreditMemoParams */ public PatchCreditMemoParams taxationItemsFields(List taxationItemsFields) { this.taxationItemsFields = taxationItemsFields; return this; } /** * Set accountFields * @param accountFields 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`, `auto_pay`, `account_number`, `bill_to_id`, `sold_to_id`, `billing_document_settings`, `communication_profile_id`, `crm_id`, `sales_rep`, `parent_account_id`, `payment_gateway`, `payment_terms`, `remaining_credit_memo_balance`, `remaining_debit_memo_balance`, `remaining_invoice_balance`, `remaining_payment_balance`, `sequence_set_id`, `tax_certificate`, `batch`, `tax_identifier`, `bill_cycle_day`, `description`, `name`, `currency`, `default_payment_method_id`, `enabled`, `organization_id` </details> (optional) * @return PatchCreditMemoParams */ public PatchCreditMemoParams accountFields(List accountFields) { this.accountFields = accountFields; return this; } /** * Set billToFields * @param billToFields 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`, `address`, `home_phone`, `first_name`, `last_name`, `email`, `work_email`, `nickname`, `other_phone`, `work_phone`, `mobile_phone`, `tax_region`, `other_phone_type`, `fax` </details> (optional) * @return PatchCreditMemoParams */ public PatchCreditMemoParams billToFields(List billToFields) { this.billToFields = billToFields; 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 PatchCreditMemoParams */ public PatchCreditMemoParams 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 PatchCreditMemoParams */ public PatchCreditMemoParams 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 PatchCreditMemoParams */ public PatchCreditMemoParams pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } } /** * Update a credit memo * Updates a credit memo by setting the values of the specified fields. Any fields not provided in the request remain unchanged. * @param creditMemoId Identifier for the credit memo, either `credit_memo_number` or `credit_memo_id` (required) * @param creditMemoPatchRequest (required) * @return CreditMemo * @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 PatchCreditMemoParams patchCreditMemoParams(String creditMemoId, CreditMemoPatchRequest creditMemoPatchRequest) { return new PatchCreditMemoParams(creditMemoId, creditMemoPatchRequest); } public CreditMemo patchCreditMemo(String creditMemoId, CreditMemoPatchRequest creditMemoPatchRequest) throws ApiException { PatchCreditMemoParams params = new PatchCreditMemoParams(creditMemoId, creditMemoPatchRequest); return executePatchCreditMemoAPICall(params).getData(); } /** * Expose HTTP info public ApiResponse patchCreditMemoWithHttpInfo(String creditMemoId, CreditMemoPatchRequest creditMemoPatchRequest) throws ApiException { PatchCreditMemoParams params = new PatchCreditMemoParams(creditMemoId, creditMemoPatchRequest); return executePatchCreditMemoAPICall(params); } **/ /** Legacy Query Params Requests **/ public CreditMemo patchCreditMemo( String creditMemoId , CreditMemoPatchRequest creditMemoPatchRequest , List expand) throws ApiException { PatchCreditMemoParams params = new PatchCreditMemoParams(creditMemoId, creditMemoPatchRequest); params.expand(expand); return executePatchCreditMemoAPICall(params).getData(); } /* * add header methods */ public CreditMemo patchCreditMemo(String creditMemoId , CreditMemoPatchRequest creditMemoPatchRequest ,List expand,Headers headers) throws ApiException { PatchCreditMemoParams params = new PatchCreditMemoParams(creditMemoId, creditMemoPatchRequest) .expand(expand) .headers(headers); return executePatchCreditMemoAPICall(params).getData(); } /** * Update a credit memo * Updates a credit memo by setting the values of the specified fields. Any fields not provided in the request remain unchanged. * @param params PatchCreditMemoParams * @return CreditMemo * @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 CreditMemo update(PatchCreditMemoParams params) throws ApiException { return executePatchCreditMemoAPICall(params).getData(); } public ApiResponse updateWithHttpInfo(PatchCreditMemoParams params) throws ApiException { return executePatchCreditMemoAPICall(params); } ApiResponse executePatchCreditMemoAPICall(PatchCreditMemoParams params) throws ApiException { return patchCreditMemoWithHttpInfo(params.creditMemoId, params.creditMemoPatchRequest, params.fields, params.creditMemoFields, params.appliedToFields, params.creditMemoItemsFields, params.taxationItemsFields, params.accountFields, params.billToFields, 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 postCreditMemoCall(String creditMemoId, List fields, List creditMemoFields, List appliedToFields, List creditMemoItemsFields, List taxationItemsFields, List accountFields, List billToFields, 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 = "/credit_memos/{credit_memo_id}/post" .replace("{" + "credit_memo_id" + "}", localVarApiClient.escapeString(creditMemoId.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 (creditMemoFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "credit_memo.fields[]", creditMemoFields)); } if (appliedToFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "applied_to.fields[]", appliedToFields)); } if (creditMemoItemsFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "credit_memo_items.fields[]", creditMemoItemsFields)); } if (taxationItemsFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "taxation_items.fields[]", taxationItemsFields)); } if (accountFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "account.fields[]", accountFields)); } if (billToFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "bill_to.fields[]", billToFields)); } 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 postCreditMemoValidateBeforeCall(String creditMemoId, List fields, List creditMemoFields, List appliedToFields, List creditMemoItemsFields, List taxationItemsFields, List accountFields, List billToFields, 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 'creditMemoId' is set if (creditMemoId == null) { throw new ApiException("Missing the required parameter 'creditMemoId' when calling postCreditMemo(Async)"); } return postCreditMemoCall(creditMemoId, fields, creditMemoFields, appliedToFields, creditMemoItemsFields, taxationItemsFields, accountFields, billToFields, expand, filter, pageSize, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback); } private ApiResponse postCreditMemoWithHttpInfo(String creditMemoId, List fields, List creditMemoFields, List appliedToFields, List creditMemoItemsFields, List taxationItemsFields, List accountFields, List billToFields, 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 = postCreditMemoValidateBeforeCall(creditMemoId, fields, creditMemoFields, appliedToFields, creditMemoItemsFields, taxationItemsFields, accountFields, billToFields, 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 postCreditMemoAsync(String creditMemoId, List fields, List creditMemoFields, List appliedToFields, List creditMemoItemsFields, List taxationItemsFields, List accountFields, List billToFields, 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 = postCreditMemoValidateBeforeCall(creditMemoId, fields, creditMemoFields, appliedToFields, creditMemoItemsFields, taxationItemsFields, accountFields, billToFields, 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 PostCreditMemoParams { private final String creditMemoId; private Headers headers; /* * Check for list params */ private GetByIdQueryParams getByIdQueryParams; private List fields; private List creditMemoFields; private List appliedToFields; private List creditMemoItemsFields; private List taxationItemsFields; private List accountFields; private List billToFields; 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 PostCreditMemoParams(String creditMemoId) { this.creditMemoId = creditMemoId; } /** * Set getByIdQueryParams * @param getByIdQueryParams GetByIdQueryParams * @return PostCreditMemoParams */ public PostCreditMemoParams 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 PostCreditMemoParams */ public PostCreditMemoParams 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`, `credit_memo_number`, `state_transitions`, `description`, `account_id`, `total`, `subtotal`, `tax`, `document_date`, `exclude_from_auto_apply_rules`, `posted_by_id`, `state`, `balance`, `invoice_id`, `reason_code`, `amount_refunded`, `bill_to_id`, `billing_document_settings`, `currency` </details> (optional) * @return PostCreditMemoParams */ public PostCreditMemoParams fields(List fields) { this.fields = fields; return this; } /** * Set creditMemoFields * @param creditMemoFields 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`, `credit_memo_number`, `state_transitions`, `description`, `account_id`, `total`, `subtotal`, `tax`, `document_date`, `exclude_from_auto_apply_rules`, `posted_by_id`, `state`, `balance`, `invoice_id`, `reason_code`, `amount_refunded`, `bill_to_id`, `billing_document_settings`, `currency` </details> (optional) * @return PostCreditMemoParams */ public PostCreditMemoParams creditMemoFields(List creditMemoFields) { this.creditMemoFields = creditMemoFields; return this; } /** * Set appliedToFields * @param appliedToFields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `id`, `amount`, `billing_document_id`, `billing_document_type` </details> (optional) * @return PostCreditMemoParams */ public PostCreditMemoParams appliedToFields(List appliedToFields) { this.appliedToFields = appliedToFields; return this; } /** * Set creditMemoItemsFields * @param creditMemoItemsFields 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`, `applied_to_item_id`, `price_id`, `discount_item`, `deferred_revenue_account`, `description`, `credit_memo_id`, `sku`, `name`, `purchase_order_number`, `quantity`, `recognized_revenue_account`, `remaining_balance`, `revenue_recognition_rule_name`, `service_end`, `service_start`, `accounts_receivable_account`, `on_account_account`, `subscription_id`, `subscription_item_id`, `tax`, `tax_code`, `tax_inclusive`, `unit_amount`, `unit_of_measure`, `subtotal`, `invoice_item_id`, `document_item_date` </details> (optional) * @return PostCreditMemoParams */ public PostCreditMemoParams creditMemoItemsFields(List creditMemoItemsFields) { this.creditMemoItemsFields = creditMemoItemsFields; return this; } /** * Set taxationItemsFields * @param taxationItemsFields 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`, `amount_exempt`, `tax_date`, `jurisdiction`, `location_code`, `name`, `sales_tax_payable_account`, `tax_code`, `tax_code_name`, `tax_rate`, `tax_rate_name`, `tax_inclusive`, `tax_rate_type`, `source_tax_item_id`, `amount_applied`, `amount_refunded`, `on_account_account` </details> (optional) * @return PostCreditMemoParams */ public PostCreditMemoParams taxationItemsFields(List taxationItemsFields) { this.taxationItemsFields = taxationItemsFields; return this; } /** * Set accountFields * @param accountFields 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`, `auto_pay`, `account_number`, `bill_to_id`, `sold_to_id`, `billing_document_settings`, `communication_profile_id`, `crm_id`, `sales_rep`, `parent_account_id`, `payment_gateway`, `payment_terms`, `remaining_credit_memo_balance`, `remaining_debit_memo_balance`, `remaining_invoice_balance`, `remaining_payment_balance`, `sequence_set_id`, `tax_certificate`, `batch`, `tax_identifier`, `bill_cycle_day`, `description`, `name`, `currency`, `default_payment_method_id`, `enabled`, `organization_id` </details> (optional) * @return PostCreditMemoParams */ public PostCreditMemoParams accountFields(List accountFields) { this.accountFields = accountFields; return this; } /** * Set billToFields * @param billToFields 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`, `address`, `home_phone`, `first_name`, `last_name`, `email`, `work_email`, `nickname`, `other_phone`, `work_phone`, `mobile_phone`, `tax_region`, `other_phone_type`, `fax` </details> (optional) * @return PostCreditMemoParams */ public PostCreditMemoParams billToFields(List billToFields) { this.billToFields = billToFields; 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 PostCreditMemoParams */ public PostCreditMemoParams 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 PostCreditMemoParams */ public PostCreditMemoParams 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 PostCreditMemoParams */ public PostCreditMemoParams pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } } /** * Post a credit memo * Opens a draft credit memo. * @param creditMemoId Identifier for the credit memo, either `credit_memo_number` or `credit_memo_id` (required) * @return CreditMemo * @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 PostCreditMemoParams postCreditMemoParams(String creditMemoId) { return new PostCreditMemoParams(creditMemoId); } public CreditMemo postCreditMemo(String creditMemoId) throws ApiException { PostCreditMemoParams params = new PostCreditMemoParams(creditMemoId); return executePostCreditMemoAPICall(params).getData(); } /** * Expose HTTP info public ApiResponse postCreditMemoWithHttpInfo(String creditMemoId) throws ApiException { PostCreditMemoParams params = new PostCreditMemoParams(creditMemoId); return executePostCreditMemoAPICall(params); } **/ /** Legacy Query Params Requests **/ public CreditMemo postCreditMemo( String creditMemoId , List expand) throws ApiException { PostCreditMemoParams params = new PostCreditMemoParams(creditMemoId); params.expand(expand); return executePostCreditMemoAPICall(params).getData(); } /* * add header methods */ public CreditMemo postCreditMemo(String creditMemoId ,List expand,Headers headers) throws ApiException { PostCreditMemoParams params = new PostCreditMemoParams(creditMemoId) .expand(expand) .headers(headers); return executePostCreditMemoAPICall(params).getData(); } /** * Post a credit memo * Opens a draft credit memo. * @param params PostCreditMemoParams * @return CreditMemo * @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 CreditMemo post(PostCreditMemoParams params) throws ApiException { return executePostCreditMemoAPICall(params).getData(); } public ApiResponse postWithHttpInfo(PostCreditMemoParams params) throws ApiException { return executePostCreditMemoAPICall(params); } ApiResponse executePostCreditMemoAPICall(PostCreditMemoParams params) throws ApiException { return postCreditMemoWithHttpInfo(params.creditMemoId, params.fields, params.creditMemoFields, params.appliedToFields, params.creditMemoItemsFields, params.taxationItemsFields, params.accountFields, params.billToFields, 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 unapplyCreditMemoCall(String creditMemoId, ApplyUnapplyCreditMemo applyUnapplyCreditMemo, List fields, List creditMemoFields, List appliedToFields, List creditMemoItemsFields, List taxationItemsFields, List accountFields, List billToFields, 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 = applyUnapplyCreditMemo; // create path and map variables String localVarPath = "/credit_memos/{credit_memo_id}/unapply" .replace("{" + "credit_memo_id" + "}", localVarApiClient.escapeString(creditMemoId.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 (creditMemoFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "credit_memo.fields[]", creditMemoFields)); } if (appliedToFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "applied_to.fields[]", appliedToFields)); } if (creditMemoItemsFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "credit_memo_items.fields[]", creditMemoItemsFields)); } if (taxationItemsFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "taxation_items.fields[]", taxationItemsFields)); } if (accountFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "account.fields[]", accountFields)); } if (billToFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "bill_to.fields[]", billToFields)); } 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 unapplyCreditMemoValidateBeforeCall(String creditMemoId, ApplyUnapplyCreditMemo applyUnapplyCreditMemo, List fields, List creditMemoFields, List appliedToFields, List creditMemoItemsFields, List taxationItemsFields, List accountFields, List billToFields, 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 'creditMemoId' is set if (creditMemoId == null) { throw new ApiException("Missing the required parameter 'creditMemoId' when calling unapplyCreditMemo(Async)"); } // verify the required parameter 'applyUnapplyCreditMemo' is set if (applyUnapplyCreditMemo == null) { throw new ApiException("Missing the required parameter 'applyUnapplyCreditMemo' when calling unapplyCreditMemo(Async)"); } return unapplyCreditMemoCall(creditMemoId, applyUnapplyCreditMemo, fields, creditMemoFields, appliedToFields, creditMemoItemsFields, taxationItemsFields, accountFields, billToFields, expand, filter, pageSize, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback); } private ApiResponse unapplyCreditMemoWithHttpInfo(String creditMemoId, ApplyUnapplyCreditMemo applyUnapplyCreditMemo, List fields, List creditMemoFields, List appliedToFields, List creditMemoItemsFields, List taxationItemsFields, List accountFields, List billToFields, 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 = unapplyCreditMemoValidateBeforeCall(creditMemoId, applyUnapplyCreditMemo, fields, creditMemoFields, appliedToFields, creditMemoItemsFields, taxationItemsFields, accountFields, billToFields, 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 unapplyCreditMemoAsync(String creditMemoId, ApplyUnapplyCreditMemo applyUnapplyCreditMemo, List fields, List creditMemoFields, List appliedToFields, List creditMemoItemsFields, List taxationItemsFields, List accountFields, List billToFields, 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 = unapplyCreditMemoValidateBeforeCall(creditMemoId, applyUnapplyCreditMemo, fields, creditMemoFields, appliedToFields, creditMemoItemsFields, taxationItemsFields, accountFields, billToFields, 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 UnapplyCreditMemoParams { private final String creditMemoId; private final ApplyUnapplyCreditMemo applyUnapplyCreditMemo; private Headers headers; /* * Check for list params */ private GetByIdQueryParams getByIdQueryParams; private List fields; private List creditMemoFields; private List appliedToFields; private List creditMemoItemsFields; private List taxationItemsFields; private List accountFields; private List billToFields; 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 UnapplyCreditMemoParams(String creditMemoId, ApplyUnapplyCreditMemo applyUnapplyCreditMemo) { this.creditMemoId = creditMemoId; this.applyUnapplyCreditMemo = applyUnapplyCreditMemo; } /** * Set getByIdQueryParams * @param getByIdQueryParams GetByIdQueryParams * @return UnapplyCreditMemoParams */ public UnapplyCreditMemoParams 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 UnapplyCreditMemoParams */ public UnapplyCreditMemoParams 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`, `credit_memo_number`, `state_transitions`, `description`, `account_id`, `total`, `subtotal`, `tax`, `document_date`, `exclude_from_auto_apply_rules`, `posted_by_id`, `state`, `balance`, `invoice_id`, `reason_code`, `amount_refunded`, `bill_to_id`, `billing_document_settings`, `currency` </details> (optional) * @return UnapplyCreditMemoParams */ public UnapplyCreditMemoParams fields(List fields) { this.fields = fields; return this; } /** * Set creditMemoFields * @param creditMemoFields 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`, `credit_memo_number`, `state_transitions`, `description`, `account_id`, `total`, `subtotal`, `tax`, `document_date`, `exclude_from_auto_apply_rules`, `posted_by_id`, `state`, `balance`, `invoice_id`, `reason_code`, `amount_refunded`, `bill_to_id`, `billing_document_settings`, `currency` </details> (optional) * @return UnapplyCreditMemoParams */ public UnapplyCreditMemoParams creditMemoFields(List creditMemoFields) { this.creditMemoFields = creditMemoFields; return this; } /** * Set appliedToFields * @param appliedToFields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `id`, `amount`, `billing_document_id`, `billing_document_type` </details> (optional) * @return UnapplyCreditMemoParams */ public UnapplyCreditMemoParams appliedToFields(List appliedToFields) { this.appliedToFields = appliedToFields; return this; } /** * Set creditMemoItemsFields * @param creditMemoItemsFields 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`, `applied_to_item_id`, `price_id`, `discount_item`, `deferred_revenue_account`, `description`, `credit_memo_id`, `sku`, `name`, `purchase_order_number`, `quantity`, `recognized_revenue_account`, `remaining_balance`, `revenue_recognition_rule_name`, `service_end`, `service_start`, `accounts_receivable_account`, `on_account_account`, `subscription_id`, `subscription_item_id`, `tax`, `tax_code`, `tax_inclusive`, `unit_amount`, `unit_of_measure`, `subtotal`, `invoice_item_id`, `document_item_date` </details> (optional) * @return UnapplyCreditMemoParams */ public UnapplyCreditMemoParams creditMemoItemsFields(List creditMemoItemsFields) { this.creditMemoItemsFields = creditMemoItemsFields; return this; } /** * Set taxationItemsFields * @param taxationItemsFields 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`, `amount_exempt`, `tax_date`, `jurisdiction`, `location_code`, `name`, `sales_tax_payable_account`, `tax_code`, `tax_code_name`, `tax_rate`, `tax_rate_name`, `tax_inclusive`, `tax_rate_type`, `source_tax_item_id`, `amount_applied`, `amount_refunded`, `on_account_account` </details> (optional) * @return UnapplyCreditMemoParams */ public UnapplyCreditMemoParams taxationItemsFields(List taxationItemsFields) { this.taxationItemsFields = taxationItemsFields; return this; } /** * Set accountFields * @param accountFields 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`, `auto_pay`, `account_number`, `bill_to_id`, `sold_to_id`, `billing_document_settings`, `communication_profile_id`, `crm_id`, `sales_rep`, `parent_account_id`, `payment_gateway`, `payment_terms`, `remaining_credit_memo_balance`, `remaining_debit_memo_balance`, `remaining_invoice_balance`, `remaining_payment_balance`, `sequence_set_id`, `tax_certificate`, `batch`, `tax_identifier`, `bill_cycle_day`, `description`, `name`, `currency`, `default_payment_method_id`, `enabled`, `organization_id` </details> (optional) * @return UnapplyCreditMemoParams */ public UnapplyCreditMemoParams accountFields(List accountFields) { this.accountFields = accountFields; return this; } /** * Set billToFields * @param billToFields 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`, `address`, `home_phone`, `first_name`, `last_name`, `email`, `work_email`, `nickname`, `other_phone`, `work_phone`, `mobile_phone`, `tax_region`, `other_phone_type`, `fax` </details> (optional) * @return UnapplyCreditMemoParams */ public UnapplyCreditMemoParams billToFields(List billToFields) { this.billToFields = billToFields; 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 UnapplyCreditMemoParams */ public UnapplyCreditMemoParams 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 UnapplyCreditMemoParams */ public UnapplyCreditMemoParams 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 UnapplyCreditMemoParams */ public UnapplyCreditMemoParams pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } } /** * Unapply a credit memo * Unapply an applied credit memo. * @param creditMemoId Identifier for the credit memo, either `credit_memo_number` or `credit_memo_id` (required) * @param applyUnapplyCreditMemo (required) * @return CreditMemo * @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 UnapplyCreditMemoParams unapplyCreditMemoParams(String creditMemoId, ApplyUnapplyCreditMemo applyUnapplyCreditMemo) { return new UnapplyCreditMemoParams(creditMemoId, applyUnapplyCreditMemo); } public CreditMemo unapplyCreditMemo(String creditMemoId, ApplyUnapplyCreditMemo applyUnapplyCreditMemo) throws ApiException { UnapplyCreditMemoParams params = new UnapplyCreditMemoParams(creditMemoId, applyUnapplyCreditMemo); return executeUnapplyCreditMemoAPICall(params).getData(); } /** * Expose HTTP info public ApiResponse unapplyCreditMemoWithHttpInfo(String creditMemoId, ApplyUnapplyCreditMemo applyUnapplyCreditMemo) throws ApiException { UnapplyCreditMemoParams params = new UnapplyCreditMemoParams(creditMemoId, applyUnapplyCreditMemo); return executeUnapplyCreditMemoAPICall(params); } **/ /** Legacy Query Params Requests **/ public CreditMemo unapplyCreditMemo( String creditMemoId , ApplyUnapplyCreditMemo applyUnapplyCreditMemo , List expand) throws ApiException { UnapplyCreditMemoParams params = new UnapplyCreditMemoParams(creditMemoId, applyUnapplyCreditMemo); params.expand(expand); return executeUnapplyCreditMemoAPICall(params).getData(); } /* * add header methods */ public CreditMemo unapplyCreditMemo(String creditMemoId , ApplyUnapplyCreditMemo applyUnapplyCreditMemo ,List expand,Headers headers) throws ApiException { UnapplyCreditMemoParams params = new UnapplyCreditMemoParams(creditMemoId, applyUnapplyCreditMemo) .expand(expand) .headers(headers); return executeUnapplyCreditMemoAPICall(params).getData(); } /** * Unapply a credit memo * Unapply an applied credit memo. * @param params UnapplyCreditMemoParams * @return CreditMemo * @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 CreditMemo unapply(UnapplyCreditMemoParams params) throws ApiException { return executeUnapplyCreditMemoAPICall(params).getData(); } public ApiResponse unapplyWithHttpInfo(UnapplyCreditMemoParams params) throws ApiException { return executeUnapplyCreditMemoAPICall(params); } ApiResponse executeUnapplyCreditMemoAPICall(UnapplyCreditMemoParams params) throws ApiException { return unapplyCreditMemoWithHttpInfo(params.creditMemoId, params.applyUnapplyCreditMemo, params.fields, params.creditMemoFields, params.appliedToFields, params.creditMemoItemsFields, params.taxationItemsFields, params.accountFields, params.billToFields, 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 unpostCreditMemoCall(String creditMemoId, List fields, List creditMemoFields, List appliedToFields, List creditMemoItemsFields, List taxationItemsFields, List accountFields, List billToFields, 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 = "/credit_memos/{credit_memo_id}/unpost" .replace("{" + "credit_memo_id" + "}", localVarApiClient.escapeString(creditMemoId.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 (creditMemoFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "credit_memo.fields[]", creditMemoFields)); } if (appliedToFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "applied_to.fields[]", appliedToFields)); } if (creditMemoItemsFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "credit_memo_items.fields[]", creditMemoItemsFields)); } if (taxationItemsFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "taxation_items.fields[]", taxationItemsFields)); } if (accountFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "account.fields[]", accountFields)); } if (billToFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "bill_to.fields[]", billToFields)); } 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 unpostCreditMemoValidateBeforeCall(String creditMemoId, List fields, List creditMemoFields, List appliedToFields, List creditMemoItemsFields, List taxationItemsFields, List accountFields, List billToFields, 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 'creditMemoId' is set if (creditMemoId == null) { throw new ApiException("Missing the required parameter 'creditMemoId' when calling unpostCreditMemo(Async)"); } return unpostCreditMemoCall(creditMemoId, fields, creditMemoFields, appliedToFields, creditMemoItemsFields, taxationItemsFields, accountFields, billToFields, expand, filter, pageSize, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback); } private ApiResponse unpostCreditMemoWithHttpInfo(String creditMemoId, List fields, List creditMemoFields, List appliedToFields, List creditMemoItemsFields, List taxationItemsFields, List accountFields, List billToFields, 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 = unpostCreditMemoValidateBeforeCall(creditMemoId, fields, creditMemoFields, appliedToFields, creditMemoItemsFields, taxationItemsFields, accountFields, billToFields, 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 unpostCreditMemoAsync(String creditMemoId, List fields, List creditMemoFields, List appliedToFields, List creditMemoItemsFields, List taxationItemsFields, List accountFields, List billToFields, 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 = unpostCreditMemoValidateBeforeCall(creditMemoId, fields, creditMemoFields, appliedToFields, creditMemoItemsFields, taxationItemsFields, accountFields, billToFields, 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 UnpostCreditMemoParams { private final String creditMemoId; private Headers headers; /* * Check for list params */ private GetByIdQueryParams getByIdQueryParams; private List fields; private List creditMemoFields; private List appliedToFields; private List creditMemoItemsFields; private List taxationItemsFields; private List accountFields; private List billToFields; 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 UnpostCreditMemoParams(String creditMemoId) { this.creditMemoId = creditMemoId; } /** * Set getByIdQueryParams * @param getByIdQueryParams GetByIdQueryParams * @return UnpostCreditMemoParams */ public UnpostCreditMemoParams 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 UnpostCreditMemoParams */ public UnpostCreditMemoParams 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`, `credit_memo_number`, `state_transitions`, `description`, `account_id`, `total`, `subtotal`, `tax`, `document_date`, `exclude_from_auto_apply_rules`, `posted_by_id`, `state`, `balance`, `invoice_id`, `reason_code`, `amount_refunded`, `bill_to_id`, `billing_document_settings`, `currency` </details> (optional) * @return UnpostCreditMemoParams */ public UnpostCreditMemoParams fields(List fields) { this.fields = fields; return this; } /** * Set creditMemoFields * @param creditMemoFields 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`, `credit_memo_number`, `state_transitions`, `description`, `account_id`, `total`, `subtotal`, `tax`, `document_date`, `exclude_from_auto_apply_rules`, `posted_by_id`, `state`, `balance`, `invoice_id`, `reason_code`, `amount_refunded`, `bill_to_id`, `billing_document_settings`, `currency` </details> (optional) * @return UnpostCreditMemoParams */ public UnpostCreditMemoParams creditMemoFields(List creditMemoFields) { this.creditMemoFields = creditMemoFields; return this; } /** * Set appliedToFields * @param appliedToFields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `id`, `amount`, `billing_document_id`, `billing_document_type` </details> (optional) * @return UnpostCreditMemoParams */ public UnpostCreditMemoParams appliedToFields(List appliedToFields) { this.appliedToFields = appliedToFields; return this; } /** * Set creditMemoItemsFields * @param creditMemoItemsFields 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`, `applied_to_item_id`, `price_id`, `discount_item`, `deferred_revenue_account`, `description`, `credit_memo_id`, `sku`, `name`, `purchase_order_number`, `quantity`, `recognized_revenue_account`, `remaining_balance`, `revenue_recognition_rule_name`, `service_end`, `service_start`, `accounts_receivable_account`, `on_account_account`, `subscription_id`, `subscription_item_id`, `tax`, `tax_code`, `tax_inclusive`, `unit_amount`, `unit_of_measure`, `subtotal`, `invoice_item_id`, `document_item_date` </details> (optional) * @return UnpostCreditMemoParams */ public UnpostCreditMemoParams creditMemoItemsFields(List creditMemoItemsFields) { this.creditMemoItemsFields = creditMemoItemsFields; return this; } /** * Set taxationItemsFields * @param taxationItemsFields 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`, `amount_exempt`, `tax_date`, `jurisdiction`, `location_code`, `name`, `sales_tax_payable_account`, `tax_code`, `tax_code_name`, `tax_rate`, `tax_rate_name`, `tax_inclusive`, `tax_rate_type`, `source_tax_item_id`, `amount_applied`, `amount_refunded`, `on_account_account` </details> (optional) * @return UnpostCreditMemoParams */ public UnpostCreditMemoParams taxationItemsFields(List taxationItemsFields) { this.taxationItemsFields = taxationItemsFields; return this; } /** * Set accountFields * @param accountFields 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`, `auto_pay`, `account_number`, `bill_to_id`, `sold_to_id`, `billing_document_settings`, `communication_profile_id`, `crm_id`, `sales_rep`, `parent_account_id`, `payment_gateway`, `payment_terms`, `remaining_credit_memo_balance`, `remaining_debit_memo_balance`, `remaining_invoice_balance`, `remaining_payment_balance`, `sequence_set_id`, `tax_certificate`, `batch`, `tax_identifier`, `bill_cycle_day`, `description`, `name`, `currency`, `default_payment_method_id`, `enabled`, `organization_id` </details> (optional) * @return UnpostCreditMemoParams */ public UnpostCreditMemoParams accountFields(List accountFields) { this.accountFields = accountFields; return this; } /** * Set billToFields * @param billToFields 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`, `address`, `home_phone`, `first_name`, `last_name`, `email`, `work_email`, `nickname`, `other_phone`, `work_phone`, `mobile_phone`, `tax_region`, `other_phone_type`, `fax` </details> (optional) * @return UnpostCreditMemoParams */ public UnpostCreditMemoParams billToFields(List billToFields) { this.billToFields = billToFields; 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 UnpostCreditMemoParams */ public UnpostCreditMemoParams 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 UnpostCreditMemoParams */ public UnpostCreditMemoParams 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 UnpostCreditMemoParams */ public UnpostCreditMemoParams pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } } /** * Unpost a credit memo * Unposts an open credit memo that has not been applied, and changes its `state` to `draft`. * @param creditMemoId Identifier for the credit memo, either `credit_memo_number` or `credit_memo_id` (required) * @return CreditMemo * @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 UnpostCreditMemoParams unpostCreditMemoParams(String creditMemoId) { return new UnpostCreditMemoParams(creditMemoId); } public CreditMemo unpostCreditMemo(String creditMemoId) throws ApiException { UnpostCreditMemoParams params = new UnpostCreditMemoParams(creditMemoId); return executeUnpostCreditMemoAPICall(params).getData(); } /** * Expose HTTP info public ApiResponse unpostCreditMemoWithHttpInfo(String creditMemoId) throws ApiException { UnpostCreditMemoParams params = new UnpostCreditMemoParams(creditMemoId); return executeUnpostCreditMemoAPICall(params); } **/ /** Legacy Query Params Requests **/ public CreditMemo unpostCreditMemo( String creditMemoId , List expand) throws ApiException { UnpostCreditMemoParams params = new UnpostCreditMemoParams(creditMemoId); params.expand(expand); return executeUnpostCreditMemoAPICall(params).getData(); } /* * add header methods */ public CreditMemo unpostCreditMemo(String creditMemoId ,List expand,Headers headers) throws ApiException { UnpostCreditMemoParams params = new UnpostCreditMemoParams(creditMemoId) .expand(expand) .headers(headers); return executeUnpostCreditMemoAPICall(params).getData(); } /** * Unpost a credit memo * Unposts an open credit memo that has not been applied, and changes its `state` to `draft`. * @param params UnpostCreditMemoParams * @return CreditMemo * @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 CreditMemo unpost(UnpostCreditMemoParams params) throws ApiException { return executeUnpostCreditMemoAPICall(params).getData(); } public ApiResponse unpostWithHttpInfo(UnpostCreditMemoParams params) throws ApiException { return executeUnpostCreditMemoAPICall(params); } ApiResponse executeUnpostCreditMemoAPICall(UnpostCreditMemoParams params) throws ApiException { return unpostCreditMemoWithHttpInfo(params.creditMemoId, params.fields, params.creditMemoFields, params.appliedToFields, params.creditMemoItemsFields, params.taxationItemsFields, params.accountFields, params.billToFields, params.expand, params.filter, params.pageSize, params.zuoraTrackId, params.async, params.zuoraCacheEnabled, params.zuoraEntityIds, params.idempotencyKey, params.acceptEncoding, params.contentEncoding, params.zuoraOrgIds); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy