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

com.zuora.api.AccountingCodesApi Maven / Gradle / Ivy

There is a newer version: 3.2.1
Show newest version
/*
 * Zuora API Reference
 * REST API reference for the Zuora Billing, Payments, and Central Platform! Check out the [REST API Overview](https://www.zuora.com/developer/api-references/api/overview/).
 *
 * The version of the OpenAPI document: 2024-05-20
 * Contact: [email protected]
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package com.zuora.api;

import com.zuora.ApiCallback;
import com.zuora.ApiClient;
import com.zuora.ApiException;
import com.zuora.ApiResponse;
import com.zuora.Configuration;
import com.zuora.Pair;
import com.zuora.ProgressRequestBody;
import com.zuora.ProgressResponseBody;

import com.google.gson.reflect.TypeToken;

import java.io.IOException;


import java.math.BigDecimal;
import com.zuora.model.CommonErrorResponse;
import com.zuora.model.CommonResponse;
import com.zuora.model.CreateAccountingCodeRequest;
import com.zuora.model.CreateAccountingCodeResponse;
import com.zuora.model.GetAccountingCodeResponse;
import com.zuora.model.GetAccountingCodesResponse;
import com.zuora.model.ProxyUnauthorizedResponse;
import com.zuora.model.UpdateAccountingCodeRequest;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class AccountingCodesApi {
    private ApiClient localVarApiClient;
    private int localHostIndex;
    private String localCustomBaseUrl;

    public AccountingCodesApi() {
        this(Configuration.getDefaultApiClient());
    }

    public AccountingCodesApi(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 activateAccountingCodeCall(String acId, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException {
        String basePath = null;
        // Operation Servers
        String[] localBasePaths = new String[] {  };

        // Determine Base Path to Use
        if (localCustomBaseUrl != null){
            basePath = localCustomBaseUrl;
        } else if ( localBasePaths.length > 0 ) {
            basePath = localBasePaths[localHostIndex];
        } else {
            basePath = null;
        }

        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/v1/accounting-codes/{ac-id}/activate"
            .replace("{" + "ac-id" + "}", localVarApiClient.escapeString(acId.toString()));

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
        Map localVarCookieParams = new HashMap();
        Map localVarFormParams = new HashMap();

        if (acceptEncoding != null) {
            localVarHeaderParams.put("Accept-Encoding", localVarApiClient.parameterToString(acceptEncoding));
        }

        if (contentEncoding != null) {
            localVarHeaderParams.put("Content-Encoding", localVarApiClient.parameterToString(contentEncoding));
        }

        if (authorization != null) {
            localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization));
        }

        if (zuoraTrackId != null) {
            localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId));
        }

        if (zuoraEntityIds != null) {
            localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds));
        }

        if (zuoraVersion != null) {
            localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion));
        }

        if (zuoraOrgIds != null) {
            localVarHeaderParams.put("Zuora-Org-Ids", localVarApiClient.parameterToString(zuoraOrgIds));
        }

        final String[] localVarAccepts = {
            "application/json"
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

        final String[] localVarContentTypes = {
        };
        final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
        if (localVarContentType != null) {
            localVarHeaderParams.put("Content-Type", localVarContentType);
        }

        String[] localVarAuthNames = new String[] { "bearerAuth" };
        return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call activateAccountingCodeValidateBeforeCall(String acId, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'acId' is set
        if (acId == null) {
            throw new ApiException("Missing the required parameter 'acId' when calling activateAccountingCode(Async)");
        }

        return activateAccountingCodeCall(acId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback);

    }

            /**
            * Activate an accounting code
            * This reference describes how to activate an accounting code through the REST API.  Prerequisites ------------- If you have Zuora Finance enabled on your tenant, you must have the Manage Accounting Code permission.  
                * @param acId ID of the accounting code you want to activate. (required)
                * @param acceptEncoding Include the `Accept-Encoding: gzip` header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response.   If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a `Content-Encoding` header with the compression algorithm so that your client can decompress it.  (optional)
                * @param contentEncoding Include the `Content-Encoding: gzip` header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload.  (optional)
                * @param authorization The value is in the `Bearer {token}` format where {token} is a valid OAuth token generated by calling [Create an OAuth token](https://www.zuora.com/developer/api-references/api/operation/createToken).  (optional)
                * @param zuoraTrackId A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue.  The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (`:`), semicolon (`;`), double quote (`\"`), and quote (`'`).  (optional)
                * @param zuoraEntityIds An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header.  (optional)
                * @param zuoraVersion The minor version of the Zuora REST API.   (optional, default to 2024-05-20)
                * @param zuoraOrgIds Comma separated IDs. If you have Zuora Multi-Org enabled, you can use this header to specify which orgs to perform the operation in. If you do not have Zuora Multi-Org enabled, you should not set this header. The IDs must be a sub-set of the user's accessible orgs. If you specify an org that the user does not have access to, the operation fails. If the header is not set, the operation is performed in scope of the user's accessible orgs.  (optional)
                * @return CommonResponse
            * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
                * @http.response.details
                
Status Code Description Response Headers
200 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ protected CommonResponse activateAccountingCode(String acId, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds) throws ApiException { ApiResponse localVarResp = activateAccountingCodeWithHttpInfo(acId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds); return localVarResp.getData(); } private ApiResponse activateAccountingCodeWithHttpInfo(String acId, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds) throws ApiException { okhttp3.Call localVarCall = activateAccountingCodeValidateBeforeCall(acId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call activateAccountingCodeAsync(String acId, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = activateAccountingCodeValidateBeforeCall(acId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class ActivateAccountingCodeApi { private final String acId; private String acceptEncoding; private String contentEncoding; private String authorization; private String zuoraTrackId; private String zuoraEntityIds; private String zuoraVersion; private String zuoraOrgIds; private ActivateAccountingCodeApi(String acId) { this.acId = acId; } /** * Set acceptEncoding * @param acceptEncoding Include the `Accept-Encoding: gzip` header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a `Content-Encoding` header with the compression algorithm so that your client can decompress it. (optional) * @return ActivateAccountingCodeApi */ public ActivateAccountingCodeApi acceptEncoding(String acceptEncoding) { this.acceptEncoding = acceptEncoding; return this; } /** * Set contentEncoding * @param contentEncoding Include the `Content-Encoding: gzip` header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload. (optional) * @return ActivateAccountingCodeApi */ public ActivateAccountingCodeApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; return this; } /** * Set authorization * @param authorization The value is in the `Bearer {token}` format where {token} is a valid OAuth token generated by calling [Create an OAuth token](https://www.zuora.com/developer/api-references/api/operation/createToken). (optional) * @return ActivateAccountingCodeApi */ public ActivateAccountingCodeApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraTrackId * @param zuoraTrackId A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (`:`), semicolon (`;`), double quote (`\"`), and quote (`'`). (optional) * @return ActivateAccountingCodeApi */ public ActivateAccountingCodeApi zuoraTrackId(String zuoraTrackId) { this.zuoraTrackId = zuoraTrackId; return this; } /** * Set zuoraEntityIds * @param zuoraEntityIds An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. (optional) * @return ActivateAccountingCodeApi */ public ActivateAccountingCodeApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return ActivateAccountingCodeApi */ public ActivateAccountingCodeApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set zuoraOrgIds * @param zuoraOrgIds Comma separated IDs. If you have Zuora Multi-Org enabled, you can use this header to specify which orgs to perform the operation in. If you do not have Zuora Multi-Org enabled, you should not set this header. The IDs must be a sub-set of the user's accessible orgs. If you specify an org that the user does not have access to, the operation fails. If the header is not set, the operation is performed in scope of the user's accessible orgs. (optional) * @return ActivateAccountingCodeApi */ public ActivateAccountingCodeApi zuoraOrgIds(String zuoraOrgIds) { this.zuoraOrgIds = zuoraOrgIds; return this; } /** * Build call for activateAccountingCode * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return activateAccountingCodeCall(acId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); } /** * Execute activateAccountingCode request * @return CommonResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public CommonResponse execute() throws ApiException { ApiResponse localVarResp = activateAccountingCodeWithHttpInfo(acId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds); return localVarResp.getData(); } /** * Execute activateAccountingCode request with HTTP info returned * @return ApiResponse<CommonResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ private ApiResponse executeWithHttpInfo() throws ApiException { return activateAccountingCodeWithHttpInfo(acId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds); } /** * Execute activateAccountingCode request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return activateAccountingCodeAsync(acId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); } } /** * Activate an accounting code * This reference describes how to activate an accounting code through the REST API. Prerequisites ------------- If you have Zuora Finance enabled on your tenant, you must have the Manage Accounting Code permission. * @param acId ID of the accounting code you want to activate. (required) * @return ActivateAccountingCodeApi */ public ActivateAccountingCodeApi activateAccountingCodeApi(String acId) { return new ActivateAccountingCodeApi(acId); } private okhttp3.Call createAccountingCodeCall(CreateAccountingCodeRequest request, String idempotencyKey, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = request; // create path and map variables String localVarPath = "/v1/accounting-codes"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (idempotencyKey != null) { localVarHeaderParams.put("Idempotency-Key", localVarApiClient.parameterToString(idempotencyKey)); } if (acceptEncoding != null) { localVarHeaderParams.put("Accept-Encoding", localVarApiClient.parameterToString(acceptEncoding)); } if (contentEncoding != null) { localVarHeaderParams.put("Content-Encoding", localVarApiClient.parameterToString(contentEncoding)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } if (zuoraOrgIds != null) { localVarHeaderParams.put("Zuora-Org-Ids", localVarApiClient.parameterToString(zuoraOrgIds)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call createAccountingCodeValidateBeforeCall(CreateAccountingCodeRequest request, String idempotencyKey, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { // verify the required parameter 'request' is set if (request == null) { throw new ApiException("Missing the required parameter 'request' when calling createAccountingCode(Async)"); } return createAccountingCodeCall(request, idempotencyKey, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); } /** * Create an accounting code * This reference describes how to create a new accounting code through the REST API. The accounting code will be active as soon as it has been created. ### Prerequisites If you have Zuora Finance enabled on your tenant, you must have the Configure Accounting Codes permission. * @param request (required) * @param idempotencyKey Specify a unique idempotency key if you want to perform an idempotent POST or PATCH request. Do not use this header in other request types. With this header specified, the Zuora server can identify subsequent retries of the same request using this value, which prevents the same operation from being performed multiple times by accident. (optional) * @param acceptEncoding Include the `Accept-Encoding: gzip` header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a `Content-Encoding` header with the compression algorithm so that your client can decompress it. (optional) * @param contentEncoding Include the `Content-Encoding: gzip` header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload. (optional) * @param authorization The value is in the `Bearer {token}` format where {token} is a valid OAuth token generated by calling [Create an OAuth token](https://www.zuora.com/developer/api-references/api/operation/createToken). (optional) * @param zuoraTrackId A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (`:`), semicolon (`;`), double quote (`\"`), and quote (`'`). (optional) * @param zuoraEntityIds An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. (optional) * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param zuoraOrgIds Comma separated IDs. If you have Zuora Multi-Org enabled, you can use this header to specify which orgs to perform the operation in. If you do not have Zuora Multi-Org enabled, you should not set this header. The IDs must be a sub-set of the user's accessible orgs. If you specify an org that the user does not have access to, the operation fails. If the header is not set, the operation is performed in scope of the user's accessible orgs. (optional) * @return CreateAccountingCodeResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ protected CreateAccountingCodeResponse createAccountingCode(CreateAccountingCodeRequest request, String idempotencyKey, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds) throws ApiException { ApiResponse localVarResp = createAccountingCodeWithHttpInfo(request, idempotencyKey, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds); return localVarResp.getData(); } private ApiResponse createAccountingCodeWithHttpInfo(CreateAccountingCodeRequest request, String idempotencyKey, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds) throws ApiException { okhttp3.Call localVarCall = createAccountingCodeValidateBeforeCall(request, idempotencyKey, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call createAccountingCodeAsync(CreateAccountingCodeRequest request, String idempotencyKey, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createAccountingCodeValidateBeforeCall(request, idempotencyKey, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class CreateAccountingCodeApi { private final CreateAccountingCodeRequest request; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String authorization; private String zuoraTrackId; private String zuoraEntityIds; private String zuoraVersion; private String zuoraOrgIds; private CreateAccountingCodeApi(CreateAccountingCodeRequest request) { this.request = request; } /** * Set idempotencyKey * @param idempotencyKey Specify a unique idempotency key if you want to perform an idempotent POST or PATCH request. Do not use this header in other request types. With this header specified, the Zuora server can identify subsequent retries of the same request using this value, which prevents the same operation from being performed multiple times by accident. (optional) * @return CreateAccountingCodeApi */ public CreateAccountingCodeApi idempotencyKey(String idempotencyKey) { this.idempotencyKey = idempotencyKey; return this; } /** * Set acceptEncoding * @param acceptEncoding Include the `Accept-Encoding: gzip` header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a `Content-Encoding` header with the compression algorithm so that your client can decompress it. (optional) * @return CreateAccountingCodeApi */ public CreateAccountingCodeApi acceptEncoding(String acceptEncoding) { this.acceptEncoding = acceptEncoding; return this; } /** * Set contentEncoding * @param contentEncoding Include the `Content-Encoding: gzip` header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload. (optional) * @return CreateAccountingCodeApi */ public CreateAccountingCodeApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; return this; } /** * Set authorization * @param authorization The value is in the `Bearer {token}` format where {token} is a valid OAuth token generated by calling [Create an OAuth token](https://www.zuora.com/developer/api-references/api/operation/createToken). (optional) * @return CreateAccountingCodeApi */ public CreateAccountingCodeApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraTrackId * @param zuoraTrackId A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (`:`), semicolon (`;`), double quote (`\"`), and quote (`'`). (optional) * @return CreateAccountingCodeApi */ public CreateAccountingCodeApi zuoraTrackId(String zuoraTrackId) { this.zuoraTrackId = zuoraTrackId; return this; } /** * Set zuoraEntityIds * @param zuoraEntityIds An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. (optional) * @return CreateAccountingCodeApi */ public CreateAccountingCodeApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return CreateAccountingCodeApi */ public CreateAccountingCodeApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set zuoraOrgIds * @param zuoraOrgIds Comma separated IDs. If you have Zuora Multi-Org enabled, you can use this header to specify which orgs to perform the operation in. If you do not have Zuora Multi-Org enabled, you should not set this header. The IDs must be a sub-set of the user's accessible orgs. If you specify an org that the user does not have access to, the operation fails. If the header is not set, the operation is performed in scope of the user's accessible orgs. (optional) * @return CreateAccountingCodeApi */ public CreateAccountingCodeApi zuoraOrgIds(String zuoraOrgIds) { this.zuoraOrgIds = zuoraOrgIds; return this; } /** * Build call for createAccountingCode * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return createAccountingCodeCall(request, idempotencyKey, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); } /** * Execute createAccountingCode request * @return CreateAccountingCodeResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public CreateAccountingCodeResponse execute() throws ApiException { ApiResponse localVarResp = createAccountingCodeWithHttpInfo(request, idempotencyKey, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds); return localVarResp.getData(); } /** * Execute createAccountingCode request with HTTP info returned * @return ApiResponse<CreateAccountingCodeResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ private ApiResponse executeWithHttpInfo() throws ApiException { return createAccountingCodeWithHttpInfo(request, idempotencyKey, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds); } /** * Execute createAccountingCode request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return createAccountingCodeAsync(request, idempotencyKey, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); } } /** * Create an accounting code * This reference describes how to create a new accounting code through the REST API. The accounting code will be active as soon as it has been created. ### Prerequisites If you have Zuora Finance enabled on your tenant, you must have the Configure Accounting Codes permission. * @param request (required) * @return CreateAccountingCodeApi */ public CreateAccountingCodeApi createAccountingCodeApi(CreateAccountingCodeRequest request) { return new CreateAccountingCodeApi(request); } private okhttp3.Call deactivateAccountingCodeCall(String acId, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/v1/accounting-codes/{ac-id}/deactivate" .replace("{" + "ac-id" + "}", localVarApiClient.escapeString(acId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (acceptEncoding != null) { localVarHeaderParams.put("Accept-Encoding", localVarApiClient.parameterToString(acceptEncoding)); } if (contentEncoding != null) { localVarHeaderParams.put("Content-Encoding", localVarApiClient.parameterToString(contentEncoding)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } if (zuoraOrgIds != null) { localVarHeaderParams.put("Zuora-Org-Ids", localVarApiClient.parameterToString(zuoraOrgIds)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deactivateAccountingCodeValidateBeforeCall(String acId, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { // verify the required parameter 'acId' is set if (acId == null) { throw new ApiException("Missing the required parameter 'acId' when calling deactivateAccountingCode(Async)"); } return deactivateAccountingCodeCall(acId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); } /** * Deactivate an accounting code * This reference describes how to deactivate an accounting code through the REST API. ### Prerequisites If you have Zuora Finance enabled on your tenant, you must have the Manage Accounting Code permission. ### Limitations You can only deactivate accounting codes that are not associated with any transactions. You cannot disable accounting codes of type AccountsReceivable. * @param acId ID of the accounting code you want to deactivate. (required) * @param acceptEncoding Include the `Accept-Encoding: gzip` header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a `Content-Encoding` header with the compression algorithm so that your client can decompress it. (optional) * @param contentEncoding Include the `Content-Encoding: gzip` header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload. (optional) * @param authorization The value is in the `Bearer {token}` format where {token} is a valid OAuth token generated by calling [Create an OAuth token](https://www.zuora.com/developer/api-references/api/operation/createToken). (optional) * @param zuoraTrackId A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (`:`), semicolon (`;`), double quote (`\"`), and quote (`'`). (optional) * @param zuoraEntityIds An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. (optional) * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param zuoraOrgIds Comma separated IDs. If you have Zuora Multi-Org enabled, you can use this header to specify which orgs to perform the operation in. If you do not have Zuora Multi-Org enabled, you should not set this header. The IDs must be a sub-set of the user's accessible orgs. If you specify an org that the user does not have access to, the operation fails. If the header is not set, the operation is performed in scope of the user's accessible orgs. (optional) * @return CommonResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ protected CommonResponse deactivateAccountingCode(String acId, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds) throws ApiException { ApiResponse localVarResp = deactivateAccountingCodeWithHttpInfo(acId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds); return localVarResp.getData(); } private ApiResponse deactivateAccountingCodeWithHttpInfo(String acId, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds) throws ApiException { okhttp3.Call localVarCall = deactivateAccountingCodeValidateBeforeCall(acId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call deactivateAccountingCodeAsync(String acId, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deactivateAccountingCodeValidateBeforeCall(acId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class DeactivateAccountingCodeApi { private final String acId; private String acceptEncoding; private String contentEncoding; private String authorization; private String zuoraTrackId; private String zuoraEntityIds; private String zuoraVersion; private String zuoraOrgIds; private DeactivateAccountingCodeApi(String acId) { this.acId = acId; } /** * Set acceptEncoding * @param acceptEncoding Include the `Accept-Encoding: gzip` header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a `Content-Encoding` header with the compression algorithm so that your client can decompress it. (optional) * @return DeactivateAccountingCodeApi */ public DeactivateAccountingCodeApi acceptEncoding(String acceptEncoding) { this.acceptEncoding = acceptEncoding; return this; } /** * Set contentEncoding * @param contentEncoding Include the `Content-Encoding: gzip` header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload. (optional) * @return DeactivateAccountingCodeApi */ public DeactivateAccountingCodeApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; return this; } /** * Set authorization * @param authorization The value is in the `Bearer {token}` format where {token} is a valid OAuth token generated by calling [Create an OAuth token](https://www.zuora.com/developer/api-references/api/operation/createToken). (optional) * @return DeactivateAccountingCodeApi */ public DeactivateAccountingCodeApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraTrackId * @param zuoraTrackId A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (`:`), semicolon (`;`), double quote (`\"`), and quote (`'`). (optional) * @return DeactivateAccountingCodeApi */ public DeactivateAccountingCodeApi zuoraTrackId(String zuoraTrackId) { this.zuoraTrackId = zuoraTrackId; return this; } /** * Set zuoraEntityIds * @param zuoraEntityIds An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. (optional) * @return DeactivateAccountingCodeApi */ public DeactivateAccountingCodeApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return DeactivateAccountingCodeApi */ public DeactivateAccountingCodeApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set zuoraOrgIds * @param zuoraOrgIds Comma separated IDs. If you have Zuora Multi-Org enabled, you can use this header to specify which orgs to perform the operation in. If you do not have Zuora Multi-Org enabled, you should not set this header. The IDs must be a sub-set of the user's accessible orgs. If you specify an org that the user does not have access to, the operation fails. If the header is not set, the operation is performed in scope of the user's accessible orgs. (optional) * @return DeactivateAccountingCodeApi */ public DeactivateAccountingCodeApi zuoraOrgIds(String zuoraOrgIds) { this.zuoraOrgIds = zuoraOrgIds; return this; } /** * Build call for deactivateAccountingCode * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return deactivateAccountingCodeCall(acId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); } /** * Execute deactivateAccountingCode request * @return CommonResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public CommonResponse execute() throws ApiException { ApiResponse localVarResp = deactivateAccountingCodeWithHttpInfo(acId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds); return localVarResp.getData(); } /** * Execute deactivateAccountingCode request with HTTP info returned * @return ApiResponse<CommonResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ private ApiResponse executeWithHttpInfo() throws ApiException { return deactivateAccountingCodeWithHttpInfo(acId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds); } /** * Execute deactivateAccountingCode request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return deactivateAccountingCodeAsync(acId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); } } /** * Deactivate an accounting code * This reference describes how to deactivate an accounting code through the REST API. ### Prerequisites If you have Zuora Finance enabled on your tenant, you must have the Manage Accounting Code permission. ### Limitations You can only deactivate accounting codes that are not associated with any transactions. You cannot disable accounting codes of type AccountsReceivable. * @param acId ID of the accounting code you want to deactivate. (required) * @return DeactivateAccountingCodeApi */ public DeactivateAccountingCodeApi deactivateAccountingCodeApi(String acId) { return new DeactivateAccountingCodeApi(acId); } private okhttp3.Call deleteAccountingCodeCall(String acId, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/v1/accounting-codes/{ac-id}" .replace("{" + "ac-id" + "}", localVarApiClient.escapeString(acId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (acceptEncoding != null) { localVarHeaderParams.put("Accept-Encoding", localVarApiClient.parameterToString(acceptEncoding)); } if (contentEncoding != null) { localVarHeaderParams.put("Content-Encoding", localVarApiClient.parameterToString(contentEncoding)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } if (zuoraOrgIds != null) { localVarHeaderParams.put("Zuora-Org-Ids", localVarApiClient.parameterToString(zuoraOrgIds)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; 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 deleteAccountingCodeValidateBeforeCall(String acId, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { // verify the required parameter 'acId' is set if (acId == null) { throw new ApiException("Missing the required parameter 'acId' when calling deleteAccountingCode(Async)"); } return deleteAccountingCodeCall(acId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); } /** * Delete an accounting code * This reference describes how to delete an accounting code through the REST API. ### Prerequisites If you have Zuora Finance enabled on your tenant, then you must have the Delete Unused Accounting Code permission. ### Limitations You can only delete accounting codes that have never been associated with any transactions. An accounting code must be deactivated before you can delete it. * @param acId ID of the accounting code you want to delete. (required) * @param acceptEncoding Include the `Accept-Encoding: gzip` header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a `Content-Encoding` header with the compression algorithm so that your client can decompress it. (optional) * @param contentEncoding Include the `Content-Encoding: gzip` header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload. (optional) * @param authorization The value is in the `Bearer {token}` format where {token} is a valid OAuth token generated by calling [Create an OAuth token](https://www.zuora.com/developer/api-references/api/operation/createToken). (optional) * @param zuoraTrackId A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (`:`), semicolon (`;`), double quote (`\"`), and quote (`'`). (optional) * @param zuoraEntityIds An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. (optional) * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param zuoraOrgIds Comma separated IDs. If you have Zuora Multi-Org enabled, you can use this header to specify which orgs to perform the operation in. If you do not have Zuora Multi-Org enabled, you should not set this header. The IDs must be a sub-set of the user's accessible orgs. If you specify an org that the user does not have access to, the operation fails. If the header is not set, the operation is performed in scope of the user's accessible orgs. (optional) * @return CommonResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ protected CommonResponse deleteAccountingCode(String acId, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds) throws ApiException { ApiResponse localVarResp = deleteAccountingCodeWithHttpInfo(acId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds); return localVarResp.getData(); } private ApiResponse deleteAccountingCodeWithHttpInfo(String acId, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds) throws ApiException { okhttp3.Call localVarCall = deleteAccountingCodeValidateBeforeCall(acId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call deleteAccountingCodeAsync(String acId, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteAccountingCodeValidateBeforeCall(acId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class DeleteAccountingCodeApi { private final String acId; private String acceptEncoding; private String contentEncoding; private String authorization; private String zuoraTrackId; private String zuoraEntityIds; private String zuoraVersion; private String zuoraOrgIds; private DeleteAccountingCodeApi(String acId) { this.acId = acId; } /** * Set acceptEncoding * @param acceptEncoding Include the `Accept-Encoding: gzip` header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a `Content-Encoding` header with the compression algorithm so that your client can decompress it. (optional) * @return DeleteAccountingCodeApi */ public DeleteAccountingCodeApi acceptEncoding(String acceptEncoding) { this.acceptEncoding = acceptEncoding; return this; } /** * Set contentEncoding * @param contentEncoding Include the `Content-Encoding: gzip` header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload. (optional) * @return DeleteAccountingCodeApi */ public DeleteAccountingCodeApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; return this; } /** * Set authorization * @param authorization The value is in the `Bearer {token}` format where {token} is a valid OAuth token generated by calling [Create an OAuth token](https://www.zuora.com/developer/api-references/api/operation/createToken). (optional) * @return DeleteAccountingCodeApi */ public DeleteAccountingCodeApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraTrackId * @param zuoraTrackId A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (`:`), semicolon (`;`), double quote (`\"`), and quote (`'`). (optional) * @return DeleteAccountingCodeApi */ public DeleteAccountingCodeApi zuoraTrackId(String zuoraTrackId) { this.zuoraTrackId = zuoraTrackId; return this; } /** * Set zuoraEntityIds * @param zuoraEntityIds An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. (optional) * @return DeleteAccountingCodeApi */ public DeleteAccountingCodeApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return DeleteAccountingCodeApi */ public DeleteAccountingCodeApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set zuoraOrgIds * @param zuoraOrgIds Comma separated IDs. If you have Zuora Multi-Org enabled, you can use this header to specify which orgs to perform the operation in. If you do not have Zuora Multi-Org enabled, you should not set this header. The IDs must be a sub-set of the user's accessible orgs. If you specify an org that the user does not have access to, the operation fails. If the header is not set, the operation is performed in scope of the user's accessible orgs. (optional) * @return DeleteAccountingCodeApi */ public DeleteAccountingCodeApi zuoraOrgIds(String zuoraOrgIds) { this.zuoraOrgIds = zuoraOrgIds; return this; } /** * Build call for deleteAccountingCode * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return deleteAccountingCodeCall(acId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); } /** * Execute deleteAccountingCode request * @return CommonResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public CommonResponse execute() throws ApiException { ApiResponse localVarResp = deleteAccountingCodeWithHttpInfo(acId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds); return localVarResp.getData(); } /** * Execute deleteAccountingCode request with HTTP info returned * @return ApiResponse<CommonResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ private ApiResponse executeWithHttpInfo() throws ApiException { return deleteAccountingCodeWithHttpInfo(acId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds); } /** * Execute deleteAccountingCode request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return deleteAccountingCodeAsync(acId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); } } /** * Delete an accounting code * This reference describes how to delete an accounting code through the REST API. ### Prerequisites If you have Zuora Finance enabled on your tenant, then you must have the Delete Unused Accounting Code permission. ### Limitations You can only delete accounting codes that have never been associated with any transactions. An accounting code must be deactivated before you can delete it. * @param acId ID of the accounting code you want to delete. (required) * @return DeleteAccountingCodeApi */ public DeleteAccountingCodeApi deleteAccountingCodeApi(String acId) { return new DeleteAccountingCodeApi(acId); } private okhttp3.Call getAccountingCodeCall(String acId, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/v1/accounting-codes/{ac-id}" .replace("{" + "ac-id" + "}", localVarApiClient.escapeString(acId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (acceptEncoding != null) { localVarHeaderParams.put("Accept-Encoding", localVarApiClient.parameterToString(acceptEncoding)); } if (contentEncoding != null) { localVarHeaderParams.put("Content-Encoding", localVarApiClient.parameterToString(contentEncoding)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } if (zuoraOrgIds != null) { localVarHeaderParams.put("Zuora-Org-Ids", localVarApiClient.parameterToString(zuoraOrgIds)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; 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 getAccountingCodeValidateBeforeCall(String acId, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { // verify the required parameter 'acId' is set if (acId == null) { throw new ApiException("Missing the required parameter 'acId' when calling getAccountingCode(Async)"); } return getAccountingCodeCall(acId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); } /** * Retrieve an accounting code * This reference describes how to query an accounting code through the REST API. * @param acId ID of the accounting code you want to query. (required) * @param acceptEncoding Include the `Accept-Encoding: gzip` header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a `Content-Encoding` header with the compression algorithm so that your client can decompress it. (optional) * @param contentEncoding Include the `Content-Encoding: gzip` header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload. (optional) * @param authorization The value is in the `Bearer {token}` format where {token} is a valid OAuth token generated by calling [Create an OAuth token](https://www.zuora.com/developer/api-references/api/operation/createToken). (optional) * @param zuoraTrackId A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (`:`), semicolon (`;`), double quote (`\"`), and quote (`'`). (optional) * @param zuoraEntityIds An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. (optional) * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param zuoraOrgIds Comma separated IDs. If you have Zuora Multi-Org enabled, you can use this header to specify which orgs to perform the operation in. If you do not have Zuora Multi-Org enabled, you should not set this header. The IDs must be a sub-set of the user's accessible orgs. If you specify an org that the user does not have access to, the operation fails. If the header is not set, the operation is performed in scope of the user's accessible orgs. (optional) * @return GetAccountingCodeResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ protected GetAccountingCodeResponse getAccountingCode(String acId, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds) throws ApiException { ApiResponse localVarResp = getAccountingCodeWithHttpInfo(acId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds); return localVarResp.getData(); } private ApiResponse getAccountingCodeWithHttpInfo(String acId, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds) throws ApiException { okhttp3.Call localVarCall = getAccountingCodeValidateBeforeCall(acId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call getAccountingCodeAsync(String acId, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getAccountingCodeValidateBeforeCall(acId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class GetAccountingCodeApi { private final String acId; private String acceptEncoding; private String contentEncoding; private String authorization; private String zuoraTrackId; private String zuoraEntityIds; private String zuoraVersion; private String zuoraOrgIds; private GetAccountingCodeApi(String acId) { this.acId = acId; } /** * Set acceptEncoding * @param acceptEncoding Include the `Accept-Encoding: gzip` header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a `Content-Encoding` header with the compression algorithm so that your client can decompress it. (optional) * @return GetAccountingCodeApi */ public GetAccountingCodeApi acceptEncoding(String acceptEncoding) { this.acceptEncoding = acceptEncoding; return this; } /** * Set contentEncoding * @param contentEncoding Include the `Content-Encoding: gzip` header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload. (optional) * @return GetAccountingCodeApi */ public GetAccountingCodeApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; return this; } /** * Set authorization * @param authorization The value is in the `Bearer {token}` format where {token} is a valid OAuth token generated by calling [Create an OAuth token](https://www.zuora.com/developer/api-references/api/operation/createToken). (optional) * @return GetAccountingCodeApi */ public GetAccountingCodeApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraTrackId * @param zuoraTrackId A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (`:`), semicolon (`;`), double quote (`\"`), and quote (`'`). (optional) * @return GetAccountingCodeApi */ public GetAccountingCodeApi zuoraTrackId(String zuoraTrackId) { this.zuoraTrackId = zuoraTrackId; return this; } /** * Set zuoraEntityIds * @param zuoraEntityIds An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. (optional) * @return GetAccountingCodeApi */ public GetAccountingCodeApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return GetAccountingCodeApi */ public GetAccountingCodeApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set zuoraOrgIds * @param zuoraOrgIds Comma separated IDs. If you have Zuora Multi-Org enabled, you can use this header to specify which orgs to perform the operation in. If you do not have Zuora Multi-Org enabled, you should not set this header. The IDs must be a sub-set of the user's accessible orgs. If you specify an org that the user does not have access to, the operation fails. If the header is not set, the operation is performed in scope of the user's accessible orgs. (optional) * @return GetAccountingCodeApi */ public GetAccountingCodeApi zuoraOrgIds(String zuoraOrgIds) { this.zuoraOrgIds = zuoraOrgIds; return this; } /** * Build call for getAccountingCode * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return getAccountingCodeCall(acId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); } /** * Execute getAccountingCode request * @return GetAccountingCodeResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public GetAccountingCodeResponse execute() throws ApiException { ApiResponse localVarResp = getAccountingCodeWithHttpInfo(acId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds); return localVarResp.getData(); } /** * Execute getAccountingCode request with HTTP info returned * @return ApiResponse<GetAccountingCodeResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ private ApiResponse executeWithHttpInfo() throws ApiException { return getAccountingCodeWithHttpInfo(acId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds); } /** * Execute getAccountingCode request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return getAccountingCodeAsync(acId, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); } } /** * Retrieve an accounting code * This reference describes how to query an accounting code through the REST API. * @param acId ID of the accounting code you want to query. (required) * @return GetAccountingCodeApi */ public GetAccountingCodeApi getAccountingCodeApi(String acId) { return new GetAccountingCodeApi(acId); } private okhttp3.Call getAllAccountingCodesCall(String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, Integer page, Integer pageSize, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/v1/accounting-codes"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (page != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); } if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } if (acceptEncoding != null) { localVarHeaderParams.put("Accept-Encoding", localVarApiClient.parameterToString(acceptEncoding)); } if (contentEncoding != null) { localVarHeaderParams.put("Content-Encoding", localVarApiClient.parameterToString(contentEncoding)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } if (zuoraOrgIds != null) { localVarHeaderParams.put("Zuora-Org-Ids", localVarApiClient.parameterToString(zuoraOrgIds)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; 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 getAllAccountingCodesValidateBeforeCall(String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, Integer page, Integer pageSize, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { return getAllAccountingCodesCall(acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, page, pageSize, zuoraVersion, zuoraOrgIds, _callback); } /** * List all accounting codes * This reference describes how to query all accounting codes in your chart of accounts through the REST API. * @param acceptEncoding Include the `Accept-Encoding: gzip` header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a `Content-Encoding` header with the compression algorithm so that your client can decompress it. (optional) * @param contentEncoding Include the `Content-Encoding: gzip` header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload. (optional) * @param authorization The value is in the `Bearer {token}` format where {token} is a valid OAuth token generated by calling [Create an OAuth token](https://www.zuora.com/developer/api-references/api/operation/createToken). (optional) * @param zuoraTrackId A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (`:`), semicolon (`;`), double quote (`\"`), and quote (`'`). (optional) * @param zuoraEntityIds An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. (optional) * @param page The index number of the page that you want to retrieve. This parameter is dependent on `pageSize`. You must set `pageSize` before specifying `page`. For example, if you set `pageSize` to `20` and `page` to `2`, the 21st to 40th records are returned in the response. (optional, default to 1) * @param pageSize The number of records returned per page in the response. (optional, default to 20) * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param zuoraOrgIds Comma separated IDs. If you have Zuora Multi-Org enabled, you can use this header to specify which orgs to perform the operation in. If you do not have Zuora Multi-Org enabled, you should not set this header. The IDs must be a sub-set of the user's accessible orgs. If you specify an org that the user does not have access to, the operation fails. If the header is not set, the operation is performed in scope of the user's accessible orgs. (optional) * @return GetAccountingCodesResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ protected GetAccountingCodesResponse getAllAccountingCodes(String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, Integer page, Integer pageSize, String zuoraVersion, String zuoraOrgIds) throws ApiException { ApiResponse localVarResp = getAllAccountingCodesWithHttpInfo(acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, page, pageSize, zuoraVersion, zuoraOrgIds); return localVarResp.getData(); } private ApiResponse getAllAccountingCodesWithHttpInfo(String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, Integer page, Integer pageSize, String zuoraVersion, String zuoraOrgIds) throws ApiException { okhttp3.Call localVarCall = getAllAccountingCodesValidateBeforeCall(acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, page, pageSize, zuoraVersion, zuoraOrgIds, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call getAllAccountingCodesAsync(String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, Integer page, Integer pageSize, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getAllAccountingCodesValidateBeforeCall(acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, page, pageSize, zuoraVersion, zuoraOrgIds, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class GetAllAccountingCodesApi { private String acceptEncoding; private String contentEncoding; private String authorization; private String zuoraTrackId; private String zuoraEntityIds; private Integer page; private Integer pageSize; private String zuoraVersion; private String zuoraOrgIds; private GetAllAccountingCodesApi() { } /** * Set acceptEncoding * @param acceptEncoding Include the `Accept-Encoding: gzip` header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a `Content-Encoding` header with the compression algorithm so that your client can decompress it. (optional) * @return GetAllAccountingCodesApi */ public GetAllAccountingCodesApi acceptEncoding(String acceptEncoding) { this.acceptEncoding = acceptEncoding; return this; } /** * Set contentEncoding * @param contentEncoding Include the `Content-Encoding: gzip` header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload. (optional) * @return GetAllAccountingCodesApi */ public GetAllAccountingCodesApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; return this; } /** * Set authorization * @param authorization The value is in the `Bearer {token}` format where {token} is a valid OAuth token generated by calling [Create an OAuth token](https://www.zuora.com/developer/api-references/api/operation/createToken). (optional) * @return GetAllAccountingCodesApi */ public GetAllAccountingCodesApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraTrackId * @param zuoraTrackId A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (`:`), semicolon (`;`), double quote (`\"`), and quote (`'`). (optional) * @return GetAllAccountingCodesApi */ public GetAllAccountingCodesApi zuoraTrackId(String zuoraTrackId) { this.zuoraTrackId = zuoraTrackId; return this; } /** * Set zuoraEntityIds * @param zuoraEntityIds An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. (optional) * @return GetAllAccountingCodesApi */ public GetAllAccountingCodesApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; return this; } /** * Set page * @param page The index number of the page that you want to retrieve. This parameter is dependent on `pageSize`. You must set `pageSize` before specifying `page`. For example, if you set `pageSize` to `20` and `page` to `2`, the 21st to 40th records are returned in the response. (optional, default to 1) * @return GetAllAccountingCodesApi */ public GetAllAccountingCodesApi page(Integer page) { this.page = page; return this; } /** * Set pageSize * @param pageSize The number of records returned per page in the response. (optional, default to 20) * @return GetAllAccountingCodesApi */ public GetAllAccountingCodesApi pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return GetAllAccountingCodesApi */ public GetAllAccountingCodesApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set zuoraOrgIds * @param zuoraOrgIds Comma separated IDs. If you have Zuora Multi-Org enabled, you can use this header to specify which orgs to perform the operation in. If you do not have Zuora Multi-Org enabled, you should not set this header. The IDs must be a sub-set of the user's accessible orgs. If you specify an org that the user does not have access to, the operation fails. If the header is not set, the operation is performed in scope of the user's accessible orgs. (optional) * @return GetAllAccountingCodesApi */ public GetAllAccountingCodesApi zuoraOrgIds(String zuoraOrgIds) { this.zuoraOrgIds = zuoraOrgIds; return this; } /** * Build call for getAllAccountingCodes * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return getAllAccountingCodesCall(acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, page, pageSize, zuoraVersion, zuoraOrgIds, _callback); } /** * Execute getAllAccountingCodes request * @return GetAccountingCodesResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public GetAccountingCodesResponse execute() throws ApiException { ApiResponse localVarResp = getAllAccountingCodesWithHttpInfo(acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, page, pageSize, zuoraVersion, zuoraOrgIds); return localVarResp.getData(); } /** * Execute getAllAccountingCodes request with HTTP info returned * @return ApiResponse<GetAccountingCodesResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ private ApiResponse executeWithHttpInfo() throws ApiException { return getAllAccountingCodesWithHttpInfo(acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, page, pageSize, zuoraVersion, zuoraOrgIds); } /** * Execute getAllAccountingCodes request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return getAllAccountingCodesAsync(acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, page, pageSize, zuoraVersion, zuoraOrgIds, _callback); } } /** * List all accounting codes * This reference describes how to query all accounting codes in your chart of accounts through the REST API. * @return GetAllAccountingCodesApi */ public GetAllAccountingCodesApi getAllAccountingCodesApi() { return new GetAllAccountingCodesApi(); } private okhttp3.Call updateAccountingCodeCall(String acId, UpdateAccountingCodeRequest request, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = request; // create path and map variables String localVarPath = "/v1/accounting-codes/{ac-id}" .replace("{" + "ac-id" + "}", localVarApiClient.escapeString(acId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (acceptEncoding != null) { localVarHeaderParams.put("Accept-Encoding", localVarApiClient.parameterToString(acceptEncoding)); } if (contentEncoding != null) { localVarHeaderParams.put("Content-Encoding", localVarApiClient.parameterToString(contentEncoding)); } if (authorization != null) { localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization)); } if (zuoraTrackId != null) { localVarHeaderParams.put("Zuora-Track-Id", localVarApiClient.parameterToString(zuoraTrackId)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("Zuora-Entity-Ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (zuoraVersion != null) { localVarHeaderParams.put("Zuora-Version", localVarApiClient.parameterToString(zuoraVersion)); } if (zuoraOrgIds != null) { localVarHeaderParams.put("Zuora-Org-Ids", localVarApiClient.parameterToString(zuoraOrgIds)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call updateAccountingCodeValidateBeforeCall(String acId, UpdateAccountingCodeRequest request, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { // verify the required parameter 'acId' is set if (acId == null) { throw new ApiException("Missing the required parameter 'acId' when calling updateAccountingCode(Async)"); } // verify the required parameter 'request' is set if (request == null) { throw new ApiException("Missing the required parameter 'request' when calling updateAccountingCode(Async)"); } return updateAccountingCodeCall(acId, request, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); } /** * Update an accounting code * This reference describes how to update an existing accounting code through the REST API. ### Prerequisites If you have Zuora Finance enabled on your tenant, you must have the Manage Accounting Code permission. ### Limitations You can only update accounting codes that are not already associated with any transactions. * @param acId ID of the accounting code you want to update. (required) * @param request (required) * @param acceptEncoding Include the `Accept-Encoding: gzip` header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a `Content-Encoding` header with the compression algorithm so that your client can decompress it. (optional) * @param contentEncoding Include the `Content-Encoding: gzip` header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload. (optional) * @param authorization The value is in the `Bearer {token}` format where {token} is a valid OAuth token generated by calling [Create an OAuth token](https://www.zuora.com/developer/api-references/api/operation/createToken). (optional) * @param zuoraTrackId A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (`:`), semicolon (`;`), double quote (`\"`), and quote (`'`). (optional) * @param zuoraEntityIds An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. (optional) * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @param zuoraOrgIds Comma separated IDs. If you have Zuora Multi-Org enabled, you can use this header to specify which orgs to perform the operation in. If you do not have Zuora Multi-Org enabled, you should not set this header. The IDs must be a sub-set of the user's accessible orgs. If you specify an org that the user does not have access to, the operation fails. If the header is not set, the operation is performed in scope of the user's accessible orgs. (optional) * @return CommonResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ protected CommonResponse updateAccountingCode(String acId, UpdateAccountingCodeRequest request, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds) throws ApiException { ApiResponse localVarResp = updateAccountingCodeWithHttpInfo(acId, request, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds); return localVarResp.getData(); } private ApiResponse updateAccountingCodeWithHttpInfo(String acId, UpdateAccountingCodeRequest request, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds) throws ApiException { okhttp3.Call localVarCall = updateAccountingCodeValidateBeforeCall(acId, request, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call updateAccountingCodeAsync(String acId, UpdateAccountingCodeRequest request, String acceptEncoding, String contentEncoding, String authorization, String zuoraTrackId, String zuoraEntityIds, String zuoraVersion, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateAccountingCodeValidateBeforeCall(acId, request, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class UpdateAccountingCodeApi { private final String acId; private final UpdateAccountingCodeRequest request; private String acceptEncoding; private String contentEncoding; private String authorization; private String zuoraTrackId; private String zuoraEntityIds; private String zuoraVersion; private String zuoraOrgIds; private UpdateAccountingCodeApi(String acId, UpdateAccountingCodeRequest request) { this.acId = acId; this.request = request; } /** * Set acceptEncoding * @param acceptEncoding Include the `Accept-Encoding: gzip` header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a `Content-Encoding` header with the compression algorithm so that your client can decompress it. (optional) * @return UpdateAccountingCodeApi */ public UpdateAccountingCodeApi acceptEncoding(String acceptEncoding) { this.acceptEncoding = acceptEncoding; return this; } /** * Set contentEncoding * @param contentEncoding Include the `Content-Encoding: gzip` header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload. (optional) * @return UpdateAccountingCodeApi */ public UpdateAccountingCodeApi contentEncoding(String contentEncoding) { this.contentEncoding = contentEncoding; return this; } /** * Set authorization * @param authorization The value is in the `Bearer {token}` format where {token} is a valid OAuth token generated by calling [Create an OAuth token](https://www.zuora.com/developer/api-references/api/operation/createToken). (optional) * @return UpdateAccountingCodeApi */ public UpdateAccountingCodeApi authorization(String authorization) { this.authorization = authorization; return this; } /** * Set zuoraTrackId * @param zuoraTrackId A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (`:`), semicolon (`;`), double quote (`\"`), and quote (`'`). (optional) * @return UpdateAccountingCodeApi */ public UpdateAccountingCodeApi zuoraTrackId(String zuoraTrackId) { this.zuoraTrackId = zuoraTrackId; return this; } /** * Set zuoraEntityIds * @param zuoraEntityIds An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. (optional) * @return UpdateAccountingCodeApi */ public UpdateAccountingCodeApi zuoraEntityIds(String zuoraEntityIds) { this.zuoraEntityIds = zuoraEntityIds; return this; } /** * Set zuoraVersion * @param zuoraVersion The minor version of the Zuora REST API. (optional, default to 2024-05-20) * @return UpdateAccountingCodeApi */ public UpdateAccountingCodeApi zuoraVersion(String zuoraVersion) { this.zuoraVersion = zuoraVersion; return this; } /** * Set zuoraOrgIds * @param zuoraOrgIds Comma separated IDs. If you have Zuora Multi-Org enabled, you can use this header to specify which orgs to perform the operation in. If you do not have Zuora Multi-Org enabled, you should not set this header. The IDs must be a sub-set of the user's accessible orgs. If you specify an org that the user does not have access to, the operation fails. If the header is not set, the operation is performed in scope of the user's accessible orgs. (optional) * @return UpdateAccountingCodeApi */ public UpdateAccountingCodeApi zuoraOrgIds(String zuoraOrgIds) { this.zuoraOrgIds = zuoraOrgIds; return this; } /** * Build call for updateAccountingCode * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return updateAccountingCodeCall(acId, request, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); } /** * Execute updateAccountingCode request * @return CommonResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public CommonResponse execute() throws ApiException { ApiResponse localVarResp = updateAccountingCodeWithHttpInfo(acId, request, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds); return localVarResp.getData(); } /** * Execute updateAccountingCode request with HTTP info returned * @return ApiResponse<CommonResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ private ApiResponse executeWithHttpInfo() throws ApiException { return updateAccountingCodeWithHttpInfo(acId, request, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds); } /** * Execute updateAccountingCode request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
400 Invalid input * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
401 * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* WWW-Authenticate - The value of this header is: ``` Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API ```
* Zuora-Request-Id -
* Zuora-Track-Id -
403 Unauthorized * Content-Encoding -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
* Zuora-Request-Id -
* Zuora-Track-Id -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return updateAccountingCodeAsync(acId, request, acceptEncoding, contentEncoding, authorization, zuoraTrackId, zuoraEntityIds, zuoraVersion, zuoraOrgIds, _callback); } } /** * Update an accounting code * This reference describes how to update an existing accounting code through the REST API. ### Prerequisites If you have Zuora Finance enabled on your tenant, you must have the Manage Accounting Code permission. ### Limitations You can only update accounting codes that are not already associated with any transactions. * @param acId ID of the accounting code you want to update. (required) * @param request (required) * @return UpdateAccountingCodeApi */ public UpdateAccountingCodeApi updateAccountingCodeApi(String acId, UpdateAccountingCodeRequest request) { return new UpdateAccountingCodeApi(acId, request); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy