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

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

There is a newer version: 3.2.1
Show newest version
/*
* Quickstart API Reference
* Zuora Quickstart API is the API that helps you achieve fundamental use cases.
* It provides a much simplified object model and improved performance, enabling developers to easily learn and use.
*/

package org.openapitools.client.api;

import org.openapitools.client.ApiCallback;
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.model.Headers;
import org.openapitools.client.model.ListQueryParams;
import org.openapitools.client.model.GetByIdQueryParams;
import org.openapitools.client.ApiResponse;
import org.openapitools.client.Configuration;
import org.openapitools.client.Pair;
import org.openapitools.client.ProgressRequestBody;
import org.openapitools.client.ProgressResponseBody;

import com.google.gson.reflect.TypeToken;
import java.io.IOException;


import java.math.BigDecimal;
import org.openapitools.client.model.ErrorResponse;
import org.openapitools.client.model.FilfillmentItemListResponse;
import org.openapitools.client.model.FulfillmentItem;
import org.openapitools.client.model.FulfillmentItemCreateBulkRequest;
import org.openapitools.client.model.FulfillmentItemCreateBulkResponse;
import org.openapitools.client.model.FulfillmentItemCreateRequest;
import org.openapitools.client.model.FulfillmentItemPatchRequest;

import org.openapitools.client.model.ErrorResponse;

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

    public class FulfillmentItemsApi {
    private ApiClient localVarApiClient;
    private int localHostIndex;
    private String localCustomBaseUrl;
    public FulfillmentItemsApi() {
    this(Configuration.getDefaultApiClient());
    }

    public FulfillmentItemsApi(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 createFulfillmentItemCall(FulfillmentItemCreateRequest fulfillmentItemCreateRequest, List fields, List fulfillmentItemFields, List expand, List filter, Integer pageSize, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException {
        String basePath = null;
        // Operation Servers
        String[] localBasePaths = new String[] {  };

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

        Object localVarPostBody = fulfillmentItemCreateRequest;

        // create path and map variables
            String localVarPath = "/fulfillments_items";


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

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

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

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

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

                    if (pageSize != null) {
                localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_size", pageSize));
                    }

                    if (zuoraTrackId != null) {
                    localVarHeaderParams.put("zuora-track-id", localVarApiClient.parameterToString(zuoraTrackId));
                    }

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

                    if (zuoraCacheEnabled != null) {
                    localVarHeaderParams.put("zuora-cache-enabled", localVarApiClient.parameterToString(zuoraCacheEnabled));
                    }

                    if (zuoraEntityIds != null) {
                    localVarHeaderParams.put("zuora-entity-ids", localVarApiClient.parameterToString(zuoraEntityIds));
                    }

                    if (idempotencyKey != null) {
                    localVarHeaderParams.put("idempotency-key", localVarApiClient.parameterToString(idempotencyKey));
                    }

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

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

                    if (zuoraOrgIds != null) {
                    localVarHeaderParams.put("zuora-org-ids", localVarApiClient.parameterToString(zuoraOrgIds));
                    }

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

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

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

            @SuppressWarnings("rawtypes")
            private okhttp3.Call createFulfillmentItemValidateBeforeCall(FulfillmentItemCreateRequest fulfillmentItemCreateRequest, List fields, List fulfillmentItemFields, List expand, List filter, Integer pageSize, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException {
                        // verify the required parameter 'fulfillmentItemCreateRequest' is set
                        if (fulfillmentItemCreateRequest == null) {
                        throw new ApiException("Missing the required parameter 'fulfillmentItemCreateRequest' when calling createFulfillmentItem(Async)");
                        }

                return createFulfillmentItemCall(fulfillmentItemCreateRequest, fields, fulfillmentItemFields, expand, filter, pageSize, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback);
            }

        private ApiResponse createFulfillmentItemWithHttpInfo(FulfillmentItemCreateRequest fulfillmentItemCreateRequest, List fields, List fulfillmentItemFields, List expand, List filter, Integer pageSize, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds) throws ApiException {
            okhttp3.Call localVarCall = createFulfillmentItemValidateBeforeCall(fulfillmentItemCreateRequest, fields, fulfillmentItemFields, expand, filter, pageSize, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, null);
                    try {
                    Type localVarReturnType = new TypeToken(){}.getType();
                    return localVarApiClient.execute(localVarCall, localVarReturnType);
                    } catch (ApiException e) {
                    e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType()));
                    throw e;
                    }
            }

        private okhttp3.Call createFulfillmentItemAsync(FulfillmentItemCreateRequest fulfillmentItemCreateRequest, List fields, List fulfillmentItemFields, List expand, List filter, Integer pageSize, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException {
            okhttp3.Call localVarCall = createFulfillmentItemValidateBeforeCall(fulfillmentItemCreateRequest, fields, fulfillmentItemFields, expand, filter, pageSize, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback);
        Type localVarReturnType = new TypeToken(){}.getType();
            localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
            return localVarCall;
            }

        public static class CreateFulfillmentItemParams {
                    private final FulfillmentItemCreateRequest fulfillmentItemCreateRequest;
            private Headers headers;
            /*
        * Check for list params
            */
                private GetByIdQueryParams getByIdQueryParams;
                    private List fields;
                    private List fulfillmentItemFields;
                    private List expand;
                    private List filter;
                    private Integer pageSize;
                    private String zuoraTrackId;
                    private Boolean async;
                    private Boolean zuoraCacheEnabled;
                    private String zuoraEntityIds;
                    private String idempotencyKey;
                    private String acceptEncoding;
                    private String contentEncoding;
                    private String zuoraOrgIds;
                public CreateFulfillmentItemParams(FulfillmentItemCreateRequest fulfillmentItemCreateRequest) {
                    this.fulfillmentItemCreateRequest = fulfillmentItemCreateRequest;
                }
                    /**
                    * Set getByIdQueryParams
                    * @param getByIdQueryParams GetByIdQueryParams
                    * @return CreateFulfillmentItemParams
                    */
                    public CreateFulfillmentItemParams getByIdQueryParams(GetByIdQueryParams getByIdQueryParams) {
                    this.getByIdQueryParams = getByIdQueryParams;
                        if (expand != null) {
                        this.expand = getByIdQueryParams.getExpand();
                        }
                        if (filter != null) {
                        this.filter = getByIdQueryParams.getFilter();
                        }
                        if (pageSize != null) {
                        this.pageSize = getByIdQueryParams.getPageSize();
                        }
                    return this;
                    }
            /**
            * Set headers
            * @param headers Headers
            * @return CreateFulfillmentItemParams
            */
            public CreateFulfillmentItemParams headers(Headers headers) {
            this.headers = headers;
                if (headers.getZuoraTrackId() != null) {
                this.zuoraTrackId = headers.getZuoraTrackId();
                }
                if (headers.getAsync() != null) {
                this.async = headers.getAsync();
                }
                if (headers.getZuoraCacheEnabled() != null) {
                this.zuoraCacheEnabled = headers.getZuoraCacheEnabled();
                }
                if (headers.getZuoraEntityIds() != null) {
                this.zuoraEntityIds = headers.getZuoraEntityIds();
                }
                if (headers.getIdempotencyKey() != null) {
                this.idempotencyKey = headers.getIdempotencyKey();
                }
                if (headers.getAcceptEncoding() != null) {
                this.acceptEncoding = headers.getAcceptEncoding();
                }
                if (headers.getContentEncoding() != null) {
                this.contentEncoding = headers.getContentEncoding();
                }
                if (headers.getZuoraOrgIds() != null) {
                this.zuoraOrgIds = headers.getZuoraOrgIds();
                }
            return this;
            }
                    /**
                    * Set fields
                    * @param fields Allows you to specify which fields are returned in the response.          <details>            <summary> Accepted values </summary>              `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `fulfillment_id`, `description`, `fulfillment_item_number`          </details> (optional)
                    * @return CreateFulfillmentItemParams
                    */
                    public CreateFulfillmentItemParams fields(List fields) {
                    this.fields = fields;
                    return this;
                    }
                    /**
                    * Set fulfillmentItemFields
                    * @param fulfillmentItemFields Allows you to specify which fields are returned in the response.          <details>            <summary> Accepted values </summary>              `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `fulfillment_id`, `description`, `fulfillment_item_number`          </details> (optional)
                    * @return CreateFulfillmentItemParams
                    */
                    public CreateFulfillmentItemParams fulfillmentItemFields(List fulfillmentItemFields) {
                    this.fulfillmentItemFields = fulfillmentItemFields;
                    return this;
                    }
                    /**
                    * Set expand
                    * @param expand Allows you to expand responses by including related object information in a single call. See the [Expand responses](https://developer.zuora.com/quickstart-api/tutorial/expand-responses/) section of the Quickstart API Tutorials for detailed instructions. (optional)
                    * @return CreateFulfillmentItemParams
                    */
                    public CreateFulfillmentItemParams expand(List expand) {
                    this.expand = expand;
                    return this;
                    }
                    /**
                    * Set filter
                    * @param filter A case-sensitive filter on the list. See the [Filter lists](https://developer.zuora.com/quickstart-api/tutorial/filter-lists/) section of the Quickstart API Tutorial for detailed instructions.                         Note that the filters on this operation are only applicable to the related objects. For example, when you are calling the \"Retrieve a billing document\" operation, you can use the `filter[]` parameter on the related objects such as `filter[]=items[account_id].EQ:8ad09e208858b5cf0188595208151c63` (optional)
                    * @return CreateFulfillmentItemParams
                    */
                    public CreateFulfillmentItemParams filter(List filter) {
                    this.filter = filter;
                    return this;
                    }
                    /**
                    * Set pageSize
                    * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 99, Zuora will return a 400 error. (optional)
                    * @return CreateFulfillmentItemParams
                    */
                    public CreateFulfillmentItemParams pageSize(Integer pageSize) {
                    this.pageSize = pageSize;
                    return this;
                    }
                }

            /**
            * Create a fulfillment item
            * Creates a new fulfillment item object.
                * @param fulfillmentItemCreateRequest  (required)
            * @return FulfillmentItem
                * @http.response.details
                
Status Code Description Response Headers
201 Default Response * ratelimit-limit - The request limit quota for the time window closest to exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* ratelimit-remaining - The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* ratelimit-reset - The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* zuora-request-id - Zuora’s internal identifier for this request.
* zuora-track-id - A user-supplied identifier for this request. If you supply a `zuora-track-id` as a request header, Zuora returns the `zuora-track-id` as a response header.
400 Bad Request -
401 Unauthorized -
404 Not Found -
405 Method Not Allowed -
429 Too Many Requests -
500 Internal Server Error -
502 Bad Gateway -
503 Service Unavailable -
504 Gateway Timeout -
*/ public CreateFulfillmentItemParams createFulfillmentItemParams(FulfillmentItemCreateRequest fulfillmentItemCreateRequest) { return new CreateFulfillmentItemParams(fulfillmentItemCreateRequest); } public FulfillmentItem createFulfillmentItem(FulfillmentItemCreateRequest fulfillmentItemCreateRequest) throws ApiException { CreateFulfillmentItemParams params = new CreateFulfillmentItemParams(fulfillmentItemCreateRequest); return executeCreateFulfillmentItemAPICall(params).getData(); } /** * Expose HTTP info public ApiResponse createFulfillmentItemWithHttpInfo(FulfillmentItemCreateRequest fulfillmentItemCreateRequest) throws ApiException { CreateFulfillmentItemParams params = new CreateFulfillmentItemParams(fulfillmentItemCreateRequest); return executeCreateFulfillmentItemAPICall(params); } **/ /** Legacy Query Params Requests **/ public FulfillmentItem createFulfillmentItem( FulfillmentItemCreateRequest fulfillmentItemCreateRequest , List expand) throws ApiException { CreateFulfillmentItemParams params = new CreateFulfillmentItemParams(fulfillmentItemCreateRequest); params.expand(expand); return executeCreateFulfillmentItemAPICall(params).getData(); } /* * add header methods */ public FulfillmentItem createFulfillmentItem(FulfillmentItemCreateRequest fulfillmentItemCreateRequest ,List expand,Headers headers) throws ApiException { CreateFulfillmentItemParams params = new CreateFulfillmentItemParams(fulfillmentItemCreateRequest) .expand(expand) .headers(headers); return executeCreateFulfillmentItemAPICall(params).getData(); } /** * Create a fulfillment item * Creates a new fulfillment item object. * @param params CreateFulfillmentItemParams * @return FulfillmentItem * @http.response.details
Status Code Description Response Headers
201 Default Response * ratelimit-limit - The request limit quota for the time window closest to exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* ratelimit-remaining - The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* ratelimit-reset - The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* zuora-request-id - Zuora’s internal identifier for this request.
* zuora-track-id - A user-supplied identifier for this request. If you supply a `zuora-track-id` as a request header, Zuora returns the `zuora-track-id` as a response header.
400 Bad Request -
401 Unauthorized -
404 Not Found -
405 Method Not Allowed -
429 Too Many Requests -
500 Internal Server Error -
502 Bad Gateway -
503 Service Unavailable -
504 Gateway Timeout -
*/ public FulfillmentItem create(CreateFulfillmentItemParams params) throws ApiException { return executeCreateFulfillmentItemAPICall(params).getData(); } public ApiResponse createWithHttpInfo(CreateFulfillmentItemParams params) throws ApiException { return executeCreateFulfillmentItemAPICall(params); } ApiResponse executeCreateFulfillmentItemAPICall(CreateFulfillmentItemParams params) throws ApiException { return createFulfillmentItemWithHttpInfo(params.fulfillmentItemCreateRequest, params.fields, params.fulfillmentItemFields, params.expand, params.filter, params.pageSize, params.zuoraTrackId, params.async, params.zuoraCacheEnabled, params.zuoraEntityIds, params.idempotencyKey, params.acceptEncoding, params.contentEncoding, params.zuoraOrgIds); } private okhttp3.Call createFulfillmentItemsCall(FulfillmentItemCreateBulkRequest fulfillmentItemCreateBulkRequest, List fields, List fulfillmentItemFields, List expand, List filter, Integer pageSize, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = fulfillmentItemCreateBulkRequest; // create path and map variables String localVarPath = "/fulfillments_items/bulk_create"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (fields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "fields[]", fields)); } if (fulfillmentItemFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "fulfillment_item.fields[]", fulfillmentItemFields)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_size", pageSize)); } if (zuoraTrackId != null) { localVarHeaderParams.put("zuora-track-id", localVarApiClient.parameterToString(zuoraTrackId)); } if (async != null) { localVarHeaderParams.put("async", localVarApiClient.parameterToString(async)); } if (zuoraCacheEnabled != null) { localVarHeaderParams.put("zuora-cache-enabled", localVarApiClient.parameterToString(zuoraCacheEnabled)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("zuora-entity-ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (idempotencyKey != null) { localVarHeaderParams.put("idempotency-key", localVarApiClient.parameterToString(idempotencyKey)); } if (acceptEncoding != null) { localVarHeaderParams.put("accept-encoding", localVarApiClient.parameterToString(acceptEncoding)); } if (contentEncoding != null) { localVarHeaderParams.put("content-encoding", localVarApiClient.parameterToString(contentEncoding)); } if (zuoraOrgIds != null) { localVarHeaderParams.put("zuora-org-ids", localVarApiClient.parameterToString(zuoraOrgIds)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call createFulfillmentItemsValidateBeforeCall(FulfillmentItemCreateBulkRequest fulfillmentItemCreateBulkRequest, List fields, List fulfillmentItemFields, List expand, List filter, Integer pageSize, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { // verify the required parameter 'fulfillmentItemCreateBulkRequest' is set if (fulfillmentItemCreateBulkRequest == null) { throw new ApiException("Missing the required parameter 'fulfillmentItemCreateBulkRequest' when calling createFulfillmentItems(Async)"); } return createFulfillmentItemsCall(fulfillmentItemCreateBulkRequest, fields, fulfillmentItemFields, expand, filter, pageSize, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback); } private ApiResponse createFulfillmentItemsWithHttpInfo(FulfillmentItemCreateBulkRequest fulfillmentItemCreateBulkRequest, List fields, List fulfillmentItemFields, List expand, List filter, Integer pageSize, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds) throws ApiException { okhttp3.Call localVarCall = createFulfillmentItemsValidateBeforeCall(fulfillmentItemCreateBulkRequest, fields, fulfillmentItemFields, expand, filter, pageSize, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, null); try { Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } catch (ApiException e) { e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); throw e; } } private okhttp3.Call createFulfillmentItemsAsync(FulfillmentItemCreateBulkRequest fulfillmentItemCreateBulkRequest, List fields, List fulfillmentItemFields, List expand, List filter, Integer pageSize, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createFulfillmentItemsValidateBeforeCall(fulfillmentItemCreateBulkRequest, fields, fulfillmentItemFields, expand, filter, pageSize, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public static class CreateFulfillmentItemsParams { private final FulfillmentItemCreateBulkRequest fulfillmentItemCreateBulkRequest; private Headers headers; /* * Check for list params */ private GetByIdQueryParams getByIdQueryParams; private List fields; private List fulfillmentItemFields; private List expand; private List filter; private Integer pageSize; private String zuoraTrackId; private Boolean async; private Boolean zuoraCacheEnabled; private String zuoraEntityIds; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraOrgIds; public CreateFulfillmentItemsParams(FulfillmentItemCreateBulkRequest fulfillmentItemCreateBulkRequest) { this.fulfillmentItemCreateBulkRequest = fulfillmentItemCreateBulkRequest; } /** * Set getByIdQueryParams * @param getByIdQueryParams GetByIdQueryParams * @return CreateFulfillmentItemsParams */ public CreateFulfillmentItemsParams getByIdQueryParams(GetByIdQueryParams getByIdQueryParams) { this.getByIdQueryParams = getByIdQueryParams; if (expand != null) { this.expand = getByIdQueryParams.getExpand(); } if (filter != null) { this.filter = getByIdQueryParams.getFilter(); } if (pageSize != null) { this.pageSize = getByIdQueryParams.getPageSize(); } return this; } /** * Set headers * @param headers Headers * @return CreateFulfillmentItemsParams */ public CreateFulfillmentItemsParams headers(Headers headers) { this.headers = headers; if (headers.getZuoraTrackId() != null) { this.zuoraTrackId = headers.getZuoraTrackId(); } if (headers.getAsync() != null) { this.async = headers.getAsync(); } if (headers.getZuoraCacheEnabled() != null) { this.zuoraCacheEnabled = headers.getZuoraCacheEnabled(); } if (headers.getZuoraEntityIds() != null) { this.zuoraEntityIds = headers.getZuoraEntityIds(); } if (headers.getIdempotencyKey() != null) { this.idempotencyKey = headers.getIdempotencyKey(); } if (headers.getAcceptEncoding() != null) { this.acceptEncoding = headers.getAcceptEncoding(); } if (headers.getContentEncoding() != null) { this.contentEncoding = headers.getContentEncoding(); } if (headers.getZuoraOrgIds() != null) { this.zuoraOrgIds = headers.getZuoraOrgIds(); } return this; } /** * Set fields * @param fields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `fulfillment_id`, `description`, `fulfillment_item_number` </details> (optional) * @return CreateFulfillmentItemsParams */ public CreateFulfillmentItemsParams fields(List fields) { this.fields = fields; return this; } /** * Set fulfillmentItemFields * @param fulfillmentItemFields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `fulfillment_id`, `description`, `fulfillment_item_number` </details> (optional) * @return CreateFulfillmentItemsParams */ public CreateFulfillmentItemsParams fulfillmentItemFields(List fulfillmentItemFields) { this.fulfillmentItemFields = fulfillmentItemFields; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. See the [Expand responses](https://developer.zuora.com/quickstart-api/tutorial/expand-responses/) section of the Quickstart API Tutorials for detailed instructions. (optional) * @return CreateFulfillmentItemsParams */ public CreateFulfillmentItemsParams expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. See the [Filter lists](https://developer.zuora.com/quickstart-api/tutorial/filter-lists/) section of the Quickstart API Tutorial for detailed instructions. Note that the filters on this operation are only applicable to the related objects. For example, when you are calling the \"Retrieve a billing document\" operation, you can use the `filter[]` parameter on the related objects such as `filter[]=items[account_id].EQ:8ad09e208858b5cf0188595208151c63` (optional) * @return CreateFulfillmentItemsParams */ public CreateFulfillmentItemsParams filter(List filter) { this.filter = filter; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 99, Zuora will return a 400 error. (optional) * @return CreateFulfillmentItemsParams */ public CreateFulfillmentItemsParams pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } } /** * Create fulfillment items * Bulk create fulfillment items. * @param fulfillmentItemCreateBulkRequest (required) * @return FulfillmentItemCreateBulkResponse * @http.response.details
Status Code Description Response Headers
201 Default Response * ratelimit-limit - The request limit quota for the time window closest to exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* ratelimit-remaining - The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* ratelimit-reset - The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* zuora-request-id - Zuora’s internal identifier for this request.
* zuora-track-id - A user-supplied identifier for this request. If you supply a `zuora-track-id` as a request header, Zuora returns the `zuora-track-id` as a response header.
400 Bad Request -
401 Unauthorized -
404 Not Found -
405 Method Not Allowed -
429 Too Many Requests -
500 Internal Server Error -
502 Bad Gateway -
503 Service Unavailable -
504 Gateway Timeout -
*/ public CreateFulfillmentItemsParams createFulfillmentItemsParams(FulfillmentItemCreateBulkRequest fulfillmentItemCreateBulkRequest) { return new CreateFulfillmentItemsParams(fulfillmentItemCreateBulkRequest); } public FulfillmentItemCreateBulkResponse createFulfillmentItems(FulfillmentItemCreateBulkRequest fulfillmentItemCreateBulkRequest) throws ApiException { CreateFulfillmentItemsParams params = new CreateFulfillmentItemsParams(fulfillmentItemCreateBulkRequest); return executeCreateFulfillmentItemsAPICall(params).getData(); } /** * Expose HTTP info public ApiResponse createFulfillmentItemsWithHttpInfo(FulfillmentItemCreateBulkRequest fulfillmentItemCreateBulkRequest) throws ApiException { CreateFulfillmentItemsParams params = new CreateFulfillmentItemsParams(fulfillmentItemCreateBulkRequest); return executeCreateFulfillmentItemsAPICall(params); } **/ /** Legacy Query Params Requests **/ public FulfillmentItemCreateBulkResponse createFulfillmentItems( FulfillmentItemCreateBulkRequest fulfillmentItemCreateBulkRequest , List expand) throws ApiException { CreateFulfillmentItemsParams params = new CreateFulfillmentItemsParams(fulfillmentItemCreateBulkRequest); params.expand(expand); return executeCreateFulfillmentItemsAPICall(params).getData(); } /* * add header methods */ public FulfillmentItemCreateBulkResponse createFulfillmentItems(FulfillmentItemCreateBulkRequest fulfillmentItemCreateBulkRequest ,List expand,Headers headers) throws ApiException { CreateFulfillmentItemsParams params = new CreateFulfillmentItemsParams(fulfillmentItemCreateBulkRequest) .expand(expand) .headers(headers); return executeCreateFulfillmentItemsAPICall(params).getData(); } /** * Create fulfillment items * Bulk create fulfillment items. * @param params CreateFulfillmentItemsParams * @return FulfillmentItemCreateBulkResponse * @http.response.details
Status Code Description Response Headers
201 Default Response * ratelimit-limit - The request limit quota for the time window closest to exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* ratelimit-remaining - The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* ratelimit-reset - The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* zuora-request-id - Zuora’s internal identifier for this request.
* zuora-track-id - A user-supplied identifier for this request. If you supply a `zuora-track-id` as a request header, Zuora returns the `zuora-track-id` as a response header.
400 Bad Request -
401 Unauthorized -
404 Not Found -
405 Method Not Allowed -
429 Too Many Requests -
500 Internal Server Error -
502 Bad Gateway -
503 Service Unavailable -
504 Gateway Timeout -
*/ public FulfillmentItemCreateBulkResponse bulkCreate(CreateFulfillmentItemsParams params) throws ApiException { return executeCreateFulfillmentItemsAPICall(params).getData(); } public ApiResponse bulkCreateWithHttpInfo(CreateFulfillmentItemsParams params) throws ApiException { return executeCreateFulfillmentItemsAPICall(params); } ApiResponse executeCreateFulfillmentItemsAPICall(CreateFulfillmentItemsParams params) throws ApiException { return createFulfillmentItemsWithHttpInfo(params.fulfillmentItemCreateBulkRequest, params.fields, params.fulfillmentItemFields, params.expand, params.filter, params.pageSize, params.zuoraTrackId, params.async, params.zuoraCacheEnabled, params.zuoraEntityIds, params.idempotencyKey, params.acceptEncoding, params.contentEncoding, params.zuoraOrgIds); } private okhttp3.Call deleteFulfillmentItemCall(String fulfillmentItemId, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/fulfillments_items/{fulfillment_item_id}" .replace("{" + "fulfillment_item_id" + "}", localVarApiClient.escapeString(fulfillmentItemId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (zuoraTrackId != null) { localVarHeaderParams.put("zuora-track-id", localVarApiClient.parameterToString(zuoraTrackId)); } if (async != null) { localVarHeaderParams.put("async", localVarApiClient.parameterToString(async)); } if (zuoraCacheEnabled != null) { localVarHeaderParams.put("zuora-cache-enabled", localVarApiClient.parameterToString(zuoraCacheEnabled)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("zuora-entity-ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (idempotencyKey != null) { localVarHeaderParams.put("idempotency-key", localVarApiClient.parameterToString(idempotencyKey)); } if (acceptEncoding != null) { localVarHeaderParams.put("accept-encoding", localVarApiClient.parameterToString(acceptEncoding)); } if (contentEncoding != null) { localVarHeaderParams.put("content-encoding", localVarApiClient.parameterToString(contentEncoding)); } if (zuoraOrgIds != null) { localVarHeaderParams.put("zuora-org-ids", localVarApiClient.parameterToString(zuoraOrgIds)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteFulfillmentItemValidateBeforeCall(String fulfillmentItemId, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { // verify the required parameter 'fulfillmentItemId' is set if (fulfillmentItemId == null) { throw new ApiException("Missing the required parameter 'fulfillmentItemId' when calling deleteFulfillmentItem(Async)"); } return deleteFulfillmentItemCall(fulfillmentItemId, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback); } private ApiResponse deleteFulfillmentItemWithHttpInfo(String fulfillmentItemId, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds) throws ApiException { okhttp3.Call localVarCall = deleteFulfillmentItemValidateBeforeCall(fulfillmentItemId, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, null); return localVarApiClient.execute(localVarCall); } private okhttp3.Call deleteFulfillmentItemAsync(String fulfillmentItemId, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteFulfillmentItemValidateBeforeCall(fulfillmentItemId, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } public static class DeleteFulfillmentItemParams { private final String fulfillmentItemId; private Headers headers; /* * Check for list params */ private GetByIdQueryParams getByIdQueryParams; private String zuoraTrackId; private Boolean async; private Boolean zuoraCacheEnabled; private String zuoraEntityIds; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraOrgIds; public DeleteFulfillmentItemParams(String fulfillmentItemId) { this.fulfillmentItemId = fulfillmentItemId; } /** * Set headers * @param headers Headers * @return DeleteFulfillmentItemParams */ public DeleteFulfillmentItemParams headers(Headers headers) { this.headers = headers; if (headers.getZuoraTrackId() != null) { this.zuoraTrackId = headers.getZuoraTrackId(); } if (headers.getAsync() != null) { this.async = headers.getAsync(); } if (headers.getZuoraCacheEnabled() != null) { this.zuoraCacheEnabled = headers.getZuoraCacheEnabled(); } if (headers.getZuoraEntityIds() != null) { this.zuoraEntityIds = headers.getZuoraEntityIds(); } if (headers.getIdempotencyKey() != null) { this.idempotencyKey = headers.getIdempotencyKey(); } if (headers.getAcceptEncoding() != null) { this.acceptEncoding = headers.getAcceptEncoding(); } if (headers.getContentEncoding() != null) { this.contentEncoding = headers.getContentEncoding(); } if (headers.getZuoraOrgIds() != null) { this.zuoraOrgIds = headers.getZuoraOrgIds(); } return this; } } /** * Delete a fulfillment item * Permanently deletes a fulfillment item. This operation cannot be undone. * @param fulfillmentItemId ID of the fulfillment item. (required) * @return * @http.response.details
Status Code Description Response Headers
204 Default Response * ratelimit-limit - The request limit quota for the time window closest to exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* ratelimit-remaining - The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* ratelimit-reset - The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* zuora-request-id - Zuora’s internal identifier for this request.
* zuora-track-id - A user-supplied identifier for this request. If you supply a `zuora-track-id` as a request header, Zuora returns the `zuora-track-id` as a response header.
400 Bad Request -
401 Unauthorized -
404 Not Found -
405 Method Not Allowed -
429 Too Many Requests -
500 Internal Server Error -
502 Bad Gateway -
503 Service Unavailable -
504 Gateway Timeout -
*/ public DeleteFulfillmentItemParams deleteFulfillmentItemParams(String fulfillmentItemId) { return new DeleteFulfillmentItemParams(fulfillmentItemId); } public void deleteFulfillmentItem(String fulfillmentItemId) throws ApiException { DeleteFulfillmentItemParams params = new DeleteFulfillmentItemParams(fulfillmentItemId); executeDeleteFulfillmentItemAPICall(params); } /** * Expose HTTP info public ApiResponse deleteFulfillmentItemWithHttpInfo(String fulfillmentItemId) throws ApiException { DeleteFulfillmentItemParams params = new DeleteFulfillmentItemParams(fulfillmentItemId); return executeDeleteFulfillmentItemAPICall(params); } **/ /** Legacy Query Params Requests **/ /* * add header methods */ public void deleteFulfillmentItem(String fulfillmentItemId ,Headers headers) throws ApiException { DeleteFulfillmentItemParams params = new DeleteFulfillmentItemParams(fulfillmentItemId) .headers(headers); executeDeleteFulfillmentItemAPICall(params); } /** * Delete a fulfillment item * Permanently deletes a fulfillment item. This operation cannot be undone. * @param params DeleteFulfillmentItemParams * @return * @http.response.details
Status Code Description Response Headers
204 Default Response * ratelimit-limit - The request limit quota for the time window closest to exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* ratelimit-remaining - The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* ratelimit-reset - The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* zuora-request-id - Zuora’s internal identifier for this request.
* zuora-track-id - A user-supplied identifier for this request. If you supply a `zuora-track-id` as a request header, Zuora returns the `zuora-track-id` as a response header.
400 Bad Request -
401 Unauthorized -
404 Not Found -
405 Method Not Allowed -
429 Too Many Requests -
500 Internal Server Error -
502 Bad Gateway -
503 Service Unavailable -
504 Gateway Timeout -
*/ public void delete(DeleteFulfillmentItemParams params) throws ApiException { executeDeleteFulfillmentItemAPICall(params).getData(); } public ApiResponse deleteWithHttpInfo(DeleteFulfillmentItemParams params) throws ApiException { return executeDeleteFulfillmentItemAPICall(params); } ApiResponse executeDeleteFulfillmentItemAPICall(DeleteFulfillmentItemParams params) throws ApiException { return deleteFulfillmentItemWithHttpInfo(params.fulfillmentItemId, params.zuoraTrackId, params.async, params.zuoraCacheEnabled, params.zuoraEntityIds, params.idempotencyKey, params.acceptEncoding, params.contentEncoding, params.zuoraOrgIds); } private okhttp3.Call getFulfillmentItemCall(String fulfillmentItemId, List fields, List fulfillmentItemFields, List expand, List filter, Integer pageSize, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/fulfillments_items/{fulfillment_item_id}" .replace("{" + "fulfillment_item_id" + "}", localVarApiClient.escapeString(fulfillmentItemId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (fields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "fields[]", fields)); } if (fulfillmentItemFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "fulfillment_item.fields[]", fulfillmentItemFields)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_size", pageSize)); } if (zuoraTrackId != null) { localVarHeaderParams.put("zuora-track-id", localVarApiClient.parameterToString(zuoraTrackId)); } if (async != null) { localVarHeaderParams.put("async", localVarApiClient.parameterToString(async)); } if (zuoraCacheEnabled != null) { localVarHeaderParams.put("zuora-cache-enabled", localVarApiClient.parameterToString(zuoraCacheEnabled)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("zuora-entity-ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (idempotencyKey != null) { localVarHeaderParams.put("idempotency-key", localVarApiClient.parameterToString(idempotencyKey)); } if (acceptEncoding != null) { localVarHeaderParams.put("accept-encoding", localVarApiClient.parameterToString(acceptEncoding)); } if (contentEncoding != null) { localVarHeaderParams.put("content-encoding", localVarApiClient.parameterToString(contentEncoding)); } if (zuoraOrgIds != null) { localVarHeaderParams.put("zuora-org-ids", localVarApiClient.parameterToString(zuoraOrgIds)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getFulfillmentItemValidateBeforeCall(String fulfillmentItemId, List fields, List fulfillmentItemFields, List expand, List filter, Integer pageSize, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { // verify the required parameter 'fulfillmentItemId' is set if (fulfillmentItemId == null) { throw new ApiException("Missing the required parameter 'fulfillmentItemId' when calling getFulfillmentItem(Async)"); } return getFulfillmentItemCall(fulfillmentItemId, fields, fulfillmentItemFields, expand, filter, pageSize, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback); } private ApiResponse getFulfillmentItemWithHttpInfo(String fulfillmentItemId, List fields, List fulfillmentItemFields, List expand, List filter, Integer pageSize, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds) throws ApiException { okhttp3.Call localVarCall = getFulfillmentItemValidateBeforeCall(fulfillmentItemId, fields, fulfillmentItemFields, expand, filter, pageSize, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, null); try { Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } catch (ApiException e) { e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); throw e; } } private okhttp3.Call getFulfillmentItemAsync(String fulfillmentItemId, List fields, List fulfillmentItemFields, List expand, List filter, Integer pageSize, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getFulfillmentItemValidateBeforeCall(fulfillmentItemId, fields, fulfillmentItemFields, expand, filter, pageSize, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public static class GetFulfillmentItemParams { private final String fulfillmentItemId; private Headers headers; /* * Check for list params */ private GetByIdQueryParams getByIdQueryParams; private List fields; private List fulfillmentItemFields; private List expand; private List filter; private Integer pageSize; private String zuoraTrackId; private Boolean async; private Boolean zuoraCacheEnabled; private String zuoraEntityIds; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraOrgIds; public GetFulfillmentItemParams(String fulfillmentItemId) { this.fulfillmentItemId = fulfillmentItemId; } /** * Set getByIdQueryParams * @param getByIdQueryParams GetByIdQueryParams * @return GetFulfillmentItemParams */ public GetFulfillmentItemParams getByIdQueryParams(GetByIdQueryParams getByIdQueryParams) { this.getByIdQueryParams = getByIdQueryParams; if (expand != null) { this.expand = getByIdQueryParams.getExpand(); } if (filter != null) { this.filter = getByIdQueryParams.getFilter(); } if (pageSize != null) { this.pageSize = getByIdQueryParams.getPageSize(); } return this; } /** * Set headers * @param headers Headers * @return GetFulfillmentItemParams */ public GetFulfillmentItemParams headers(Headers headers) { this.headers = headers; if (headers.getZuoraTrackId() != null) { this.zuoraTrackId = headers.getZuoraTrackId(); } if (headers.getAsync() != null) { this.async = headers.getAsync(); } if (headers.getZuoraCacheEnabled() != null) { this.zuoraCacheEnabled = headers.getZuoraCacheEnabled(); } if (headers.getZuoraEntityIds() != null) { this.zuoraEntityIds = headers.getZuoraEntityIds(); } if (headers.getIdempotencyKey() != null) { this.idempotencyKey = headers.getIdempotencyKey(); } if (headers.getAcceptEncoding() != null) { this.acceptEncoding = headers.getAcceptEncoding(); } if (headers.getContentEncoding() != null) { this.contentEncoding = headers.getContentEncoding(); } if (headers.getZuoraOrgIds() != null) { this.zuoraOrgIds = headers.getZuoraOrgIds(); } return this; } /** * Set fields * @param fields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `fulfillment_id`, `description`, `fulfillment_item_number` </details> (optional) * @return GetFulfillmentItemParams */ public GetFulfillmentItemParams fields(List fields) { this.fields = fields; return this; } /** * Set fulfillmentItemFields * @param fulfillmentItemFields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `fulfillment_id`, `description`, `fulfillment_item_number` </details> (optional) * @return GetFulfillmentItemParams */ public GetFulfillmentItemParams fulfillmentItemFields(List fulfillmentItemFields) { this.fulfillmentItemFields = fulfillmentItemFields; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. See the [Expand responses](https://developer.zuora.com/quickstart-api/tutorial/expand-responses/) section of the Quickstart API Tutorials for detailed instructions. (optional) * @return GetFulfillmentItemParams */ public GetFulfillmentItemParams expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. See the [Filter lists](https://developer.zuora.com/quickstart-api/tutorial/filter-lists/) section of the Quickstart API Tutorial for detailed instructions. Note that the filters on this operation are only applicable to the related objects. For example, when you are calling the \"Retrieve a billing document\" operation, you can use the `filter[]` parameter on the related objects such as `filter[]=items[account_id].EQ:8ad09e208858b5cf0188595208151c63` (optional) * @return GetFulfillmentItemParams */ public GetFulfillmentItemParams filter(List filter) { this.filter = filter; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 99, Zuora will return a 400 error. (optional) * @return GetFulfillmentItemParams */ public GetFulfillmentItemParams pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } } /** * Retrieve a fulfillment item * Retrieves the fulfillment item with the given ID. * @param fulfillmentItemId ID of the fulfillment item. (required) * @return FulfillmentItem * @http.response.details
Status Code Description Response Headers
200 Default Response * ratelimit-limit - The request limit quota for the time window closest to exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* ratelimit-remaining - The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* ratelimit-reset - The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* zuora-request-id - Zuora’s internal identifier for this request.
* zuora-track-id - A user-supplied identifier for this request. If you supply a `zuora-track-id` as a request header, Zuora returns the `zuora-track-id` as a response header.
400 Bad Request -
401 Unauthorized -
404 Not Found -
405 Method Not Allowed -
429 Too Many Requests -
500 Internal Server Error -
502 Bad Gateway -
503 Service Unavailable -
504 Gateway Timeout -
*/ public GetFulfillmentItemParams getFulfillmentItemParams(String fulfillmentItemId) { return new GetFulfillmentItemParams(fulfillmentItemId); } public FulfillmentItem getFulfillmentItem(String fulfillmentItemId) throws ApiException { GetFulfillmentItemParams params = new GetFulfillmentItemParams(fulfillmentItemId); return executeGetFulfillmentItemAPICall(params).getData(); } /** * Expose HTTP info public ApiResponse getFulfillmentItemWithHttpInfo(String fulfillmentItemId) throws ApiException { GetFulfillmentItemParams params = new GetFulfillmentItemParams(fulfillmentItemId); return executeGetFulfillmentItemAPICall(params); } **/ /** Legacy Query Params Requests **/ public FulfillmentItem getFulfillmentItem( String fulfillmentItemId , List expand) throws ApiException { GetFulfillmentItemParams params = new GetFulfillmentItemParams(fulfillmentItemId); params.expand(expand); return executeGetFulfillmentItemAPICall(params).getData(); } /* * add header methods */ public FulfillmentItem getFulfillmentItem(String fulfillmentItemId ,List expand,Headers headers) throws ApiException { GetFulfillmentItemParams params = new GetFulfillmentItemParams(fulfillmentItemId) .expand(expand) .headers(headers); return executeGetFulfillmentItemAPICall(params).getData(); } /** * Retrieve a fulfillment item * Retrieves the fulfillment item with the given ID. * @param params GetFulfillmentItemParams * @return FulfillmentItem * @http.response.details
Status Code Description Response Headers
200 Default Response * ratelimit-limit - The request limit quota for the time window closest to exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* ratelimit-remaining - The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* ratelimit-reset - The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* zuora-request-id - Zuora’s internal identifier for this request.
* zuora-track-id - A user-supplied identifier for this request. If you supply a `zuora-track-id` as a request header, Zuora returns the `zuora-track-id` as a response header.
400 Bad Request -
401 Unauthorized -
404 Not Found -
405 Method Not Allowed -
429 Too Many Requests -
500 Internal Server Error -
502 Bad Gateway -
503 Service Unavailable -
504 Gateway Timeout -
*/ public FulfillmentItem get(GetFulfillmentItemParams params) throws ApiException { return executeGetFulfillmentItemAPICall(params).getData(); } public ApiResponse getWithHttpInfo(GetFulfillmentItemParams params) throws ApiException { return executeGetFulfillmentItemAPICall(params); } ApiResponse executeGetFulfillmentItemAPICall(GetFulfillmentItemParams params) throws ApiException { return getFulfillmentItemWithHttpInfo(params.fulfillmentItemId, params.fields, params.fulfillmentItemFields, params.expand, params.filter, params.pageSize, params.zuoraTrackId, params.async, params.zuoraCacheEnabled, params.zuoraEntityIds, params.idempotencyKey, params.acceptEncoding, params.contentEncoding, params.zuoraOrgIds); } private okhttp3.Call getFulfillmentItemsCall(String cursor, List expand, List filter, List sort, Integer pageSize, List fields, List fulfillmentItemFields, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/fulfillments_items"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_size", pageSize)); } if (fields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "fields[]", fields)); } if (fulfillmentItemFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "fulfillment_item.fields[]", fulfillmentItemFields)); } if (zuoraTrackId != null) { localVarHeaderParams.put("zuora-track-id", localVarApiClient.parameterToString(zuoraTrackId)); } if (async != null) { localVarHeaderParams.put("async", localVarApiClient.parameterToString(async)); } if (zuoraCacheEnabled != null) { localVarHeaderParams.put("zuora-cache-enabled", localVarApiClient.parameterToString(zuoraCacheEnabled)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("zuora-entity-ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (idempotencyKey != null) { localVarHeaderParams.put("idempotency-key", localVarApiClient.parameterToString(idempotencyKey)); } if (acceptEncoding != null) { localVarHeaderParams.put("accept-encoding", localVarApiClient.parameterToString(acceptEncoding)); } if (contentEncoding != null) { localVarHeaderParams.put("content-encoding", localVarApiClient.parameterToString(contentEncoding)); } if (zuoraOrgIds != null) { localVarHeaderParams.put("zuora-org-ids", localVarApiClient.parameterToString(zuoraOrgIds)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getFulfillmentItemsValidateBeforeCall(String cursor, List expand, List filter, List sort, Integer pageSize, List fields, List fulfillmentItemFields, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { return getFulfillmentItemsCall(cursor, expand, filter, sort, pageSize, fields, fulfillmentItemFields, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback); } private ApiResponse getFulfillmentItemsWithHttpInfo(String cursor, List expand, List filter, List sort, Integer pageSize, List fields, List fulfillmentItemFields, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds) throws ApiException { okhttp3.Call localVarCall = getFulfillmentItemsValidateBeforeCall(cursor, expand, filter, sort, pageSize, fields, fulfillmentItemFields, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, null); try { Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } catch (ApiException e) { e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); throw e; } } private okhttp3.Call getFulfillmentItemsAsync(String cursor, List expand, List filter, List sort, Integer pageSize, List fields, List fulfillmentItemFields, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getFulfillmentItemsValidateBeforeCall(cursor, expand, filter, sort, pageSize, fields, fulfillmentItemFields, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public static class GetFulfillmentItemsParams { private Headers headers; /* * Check for list params */ private ListQueryParams listQueryParams; private String cursor; private List expand; private List filter; private List sort; private Integer pageSize; private List fields; private List fulfillmentItemFields; private String zuoraTrackId; private Boolean async; private Boolean zuoraCacheEnabled; private String zuoraEntityIds; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraOrgIds; public GetFulfillmentItemsParams() { } /** * Set listQueryParams * @param listQueryParams ListQueryParams * @return GetFulfillmentItemsParams */ public GetFulfillmentItemsParams listQueryParams(ListQueryParams listQueryParams) { this.listQueryParams = listQueryParams; if (cursor != null) { this.cursor = listQueryParams.getCursor(); } if (expand != null) { this.expand = listQueryParams.getExpand(); } if (filter != null) { this.filter = listQueryParams.getFilter(); } if (sort != null) { this.sort = listQueryParams.getSort(); } if (pageSize != null) { this.pageSize = listQueryParams.getPageSize(); } return this; } /** * Set headers * @param headers Headers * @return GetFulfillmentItemsParams */ public GetFulfillmentItemsParams headers(Headers headers) { this.headers = headers; if (headers.getZuoraTrackId() != null) { this.zuoraTrackId = headers.getZuoraTrackId(); } if (headers.getAsync() != null) { this.async = headers.getAsync(); } if (headers.getZuoraCacheEnabled() != null) { this.zuoraCacheEnabled = headers.getZuoraCacheEnabled(); } if (headers.getZuoraEntityIds() != null) { this.zuoraEntityIds = headers.getZuoraEntityIds(); } if (headers.getIdempotencyKey() != null) { this.idempotencyKey = headers.getIdempotencyKey(); } if (headers.getAcceptEncoding() != null) { this.acceptEncoding = headers.getAcceptEncoding(); } if (headers.getContentEncoding() != null) { this.contentEncoding = headers.getContentEncoding(); } if (headers.getZuoraOrgIds() != null) { this.zuoraOrgIds = headers.getZuoraOrgIds(); } return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return GetFulfillmentItemsParams */ public GetFulfillmentItemsParams cursor(String cursor) { this.cursor = cursor; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. See the [Expand responses](https://developer.zuora.com/quickstart-api/tutorial/expand-responses/) section of the Quickstart API Tutorials for detailed instructions. (optional) * @return GetFulfillmentItemsParams */ public GetFulfillmentItemsParams expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. See the [Filter lists](https://developer.zuora.com/quickstart-api/tutorial/filter-lists/) section of the Quickstart API Tutorials for detailed instructions. (optional) * @return GetFulfillmentItemsParams */ public GetFulfillmentItemsParams filter(List filter) { this.filter = filter; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `account_number.asc`) or descending (e.g. `account_number.desc`). You cannot sort on properties that are arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return GetFulfillmentItemsParams */ public GetFulfillmentItemsParams sort(List sort) { this.sort = sort; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 99, Zuora will return a 400 error. (optional) * @return GetFulfillmentItemsParams */ public GetFulfillmentItemsParams pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set fields * @param fields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `fulfillment_id`, `description`, `fulfillment_item_number` </details> (optional) * @return GetFulfillmentItemsParams */ public GetFulfillmentItemsParams fields(List fields) { this.fields = fields; return this; } /** * Set fulfillmentItemFields * @param fulfillmentItemFields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `fulfillment_id`, `description`, `fulfillment_item_number` </details> (optional) * @return GetFulfillmentItemsParams */ public GetFulfillmentItemsParams fulfillmentItemFields(List fulfillmentItemFields) { this.fulfillmentItemFields = fulfillmentItemFields; return this; } } /** * List fulfillment items * Returns a dictionary with a data property that contains an array of fulfillment items, starting after the cursor, if used. Each entry in the array is a separate fulfillment item object. If no more fulfillment item are available, the resulting array will be empty. This request should never return an error. * @return FilfillmentItemListResponse * @http.response.details
Status Code Description Response Headers
200 Default Response * ratelimit-limit - The request limit quota for the time window closest to exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* ratelimit-remaining - The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* ratelimit-reset - The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* zuora-request-id - Zuora’s internal identifier for this request.
* zuora-track-id - A user-supplied identifier for this request. If you supply a `zuora-track-id` as a request header, Zuora returns the `zuora-track-id` as a response header.
400 Bad Request -
401 Unauthorized -
404 Not Found -
405 Method Not Allowed -
429 Too Many Requests -
500 Internal Server Error -
502 Bad Gateway -
503 Service Unavailable -
504 Gateway Timeout -
*/ public GetFulfillmentItemsParams getFulfillmentItemsParams() { return new GetFulfillmentItemsParams(); } public FilfillmentItemListResponse getFulfillmentItems() throws ApiException { GetFulfillmentItemsParams params = new GetFulfillmentItemsParams(); return executeGetFulfillmentItemsAPICall(params).getData(); } /** * Expose HTTP info public ApiResponse getFulfillmentItemsWithHttpInfo() throws ApiException { GetFulfillmentItemsParams params = new GetFulfillmentItemsParams(); return executeGetFulfillmentItemsAPICall(params); } **/ /** Legacy Query Params Requests **/ public FilfillmentItemListResponse getFulfillmentItems(String cursor, List expand, List filter) throws ApiException { GetFulfillmentItemsParams params = new GetFulfillmentItemsParams(); params.cursor(cursor); params.expand(expand); params.filter(filter); return executeGetFulfillmentItemsAPICall(params).getData(); } /* * add header methods */ public FilfillmentItemListResponse getFulfillmentItems(String cursor,List expand,List filter,Headers headers) throws ApiException { GetFulfillmentItemsParams params = new GetFulfillmentItemsParams() .cursor(cursor) .expand(expand) .filter(filter) .headers(headers); return executeGetFulfillmentItemsAPICall(params).getData(); } /** * List fulfillment items * Returns a dictionary with a data property that contains an array of fulfillment items, starting after the cursor, if used. Each entry in the array is a separate fulfillment item object. If no more fulfillment item are available, the resulting array will be empty. This request should never return an error. * @param params GetFulfillmentItemsParams * @return FilfillmentItemListResponse * @http.response.details
Status Code Description Response Headers
200 Default Response * ratelimit-limit - The request limit quota for the time window closest to exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* ratelimit-remaining - The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* ratelimit-reset - The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* zuora-request-id - Zuora’s internal identifier for this request.
* zuora-track-id - A user-supplied identifier for this request. If you supply a `zuora-track-id` as a request header, Zuora returns the `zuora-track-id` as a response header.
400 Bad Request -
401 Unauthorized -
404 Not Found -
405 Method Not Allowed -
429 Too Many Requests -
500 Internal Server Error -
502 Bad Gateway -
503 Service Unavailable -
504 Gateway Timeout -
*/ public FilfillmentItemListResponse list(GetFulfillmentItemsParams params) throws ApiException { return executeGetFulfillmentItemsAPICall(params).getData(); } public ApiResponse listWithHttpInfo(GetFulfillmentItemsParams params) throws ApiException { return executeGetFulfillmentItemsAPICall(params); } ApiResponse executeGetFulfillmentItemsAPICall(GetFulfillmentItemsParams params) throws ApiException { return getFulfillmentItemsWithHttpInfo(params.cursor, params.expand, params.filter, params.sort, params.pageSize, params.fields, params.fulfillmentItemFields, params.zuoraTrackId, params.async, params.zuoraCacheEnabled, params.zuoraEntityIds, params.idempotencyKey, params.acceptEncoding, params.contentEncoding, params.zuoraOrgIds); } private okhttp3.Call updateFulfillmentItemCall(String fulfillmentItemId, FulfillmentItemPatchRequest fulfillmentItemPatchRequest, List fields, List fulfillmentItemFields, List expand, List filter, Integer pageSize, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = fulfillmentItemPatchRequest; // create path and map variables String localVarPath = "/fulfillments_items/{fulfillment_item_id}" .replace("{" + "fulfillment_item_id" + "}", localVarApiClient.escapeString(fulfillmentItemId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (fields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "fields[]", fields)); } if (fulfillmentItemFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "fulfillment_item.fields[]", fulfillmentItemFields)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_size", pageSize)); } if (zuoraTrackId != null) { localVarHeaderParams.put("zuora-track-id", localVarApiClient.parameterToString(zuoraTrackId)); } if (async != null) { localVarHeaderParams.put("async", localVarApiClient.parameterToString(async)); } if (zuoraCacheEnabled != null) { localVarHeaderParams.put("zuora-cache-enabled", localVarApiClient.parameterToString(zuoraCacheEnabled)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("zuora-entity-ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (idempotencyKey != null) { localVarHeaderParams.put("idempotency-key", localVarApiClient.parameterToString(idempotencyKey)); } if (acceptEncoding != null) { localVarHeaderParams.put("accept-encoding", localVarApiClient.parameterToString(acceptEncoding)); } if (contentEncoding != null) { localVarHeaderParams.put("content-encoding", localVarApiClient.parameterToString(contentEncoding)); } if (zuoraOrgIds != null) { localVarHeaderParams.put("zuora-org-ids", localVarApiClient.parameterToString(zuoraOrgIds)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call updateFulfillmentItemValidateBeforeCall(String fulfillmentItemId, FulfillmentItemPatchRequest fulfillmentItemPatchRequest, List fields, List fulfillmentItemFields, List expand, List filter, Integer pageSize, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { // verify the required parameter 'fulfillmentItemId' is set if (fulfillmentItemId == null) { throw new ApiException("Missing the required parameter 'fulfillmentItemId' when calling updateFulfillmentItem(Async)"); } // verify the required parameter 'fulfillmentItemPatchRequest' is set if (fulfillmentItemPatchRequest == null) { throw new ApiException("Missing the required parameter 'fulfillmentItemPatchRequest' when calling updateFulfillmentItem(Async)"); } return updateFulfillmentItemCall(fulfillmentItemId, fulfillmentItemPatchRequest, fields, fulfillmentItemFields, expand, filter, pageSize, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback); } private ApiResponse updateFulfillmentItemWithHttpInfo(String fulfillmentItemId, FulfillmentItemPatchRequest fulfillmentItemPatchRequest, List fields, List fulfillmentItemFields, List expand, List filter, Integer pageSize, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds) throws ApiException { okhttp3.Call localVarCall = updateFulfillmentItemValidateBeforeCall(fulfillmentItemId, fulfillmentItemPatchRequest, fields, fulfillmentItemFields, expand, filter, pageSize, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, null); try { Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } catch (ApiException e) { e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); throw e; } } private okhttp3.Call updateFulfillmentItemAsync(String fulfillmentItemId, FulfillmentItemPatchRequest fulfillmentItemPatchRequest, List fields, List fulfillmentItemFields, List expand, List filter, Integer pageSize, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateFulfillmentItemValidateBeforeCall(fulfillmentItemId, fulfillmentItemPatchRequest, fields, fulfillmentItemFields, expand, filter, pageSize, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public static class UpdateFulfillmentItemParams { private final String fulfillmentItemId; private final FulfillmentItemPatchRequest fulfillmentItemPatchRequest; private Headers headers; /* * Check for list params */ private GetByIdQueryParams getByIdQueryParams; private List fields; private List fulfillmentItemFields; private List expand; private List filter; private Integer pageSize; private String zuoraTrackId; private Boolean async; private Boolean zuoraCacheEnabled; private String zuoraEntityIds; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraOrgIds; public UpdateFulfillmentItemParams(String fulfillmentItemId, FulfillmentItemPatchRequest fulfillmentItemPatchRequest) { this.fulfillmentItemId = fulfillmentItemId; this.fulfillmentItemPatchRequest = fulfillmentItemPatchRequest; } /** * Set getByIdQueryParams * @param getByIdQueryParams GetByIdQueryParams * @return UpdateFulfillmentItemParams */ public UpdateFulfillmentItemParams getByIdQueryParams(GetByIdQueryParams getByIdQueryParams) { this.getByIdQueryParams = getByIdQueryParams; if (expand != null) { this.expand = getByIdQueryParams.getExpand(); } if (filter != null) { this.filter = getByIdQueryParams.getFilter(); } if (pageSize != null) { this.pageSize = getByIdQueryParams.getPageSize(); } return this; } /** * Set headers * @param headers Headers * @return UpdateFulfillmentItemParams */ public UpdateFulfillmentItemParams headers(Headers headers) { this.headers = headers; if (headers.getZuoraTrackId() != null) { this.zuoraTrackId = headers.getZuoraTrackId(); } if (headers.getAsync() != null) { this.async = headers.getAsync(); } if (headers.getZuoraCacheEnabled() != null) { this.zuoraCacheEnabled = headers.getZuoraCacheEnabled(); } if (headers.getZuoraEntityIds() != null) { this.zuoraEntityIds = headers.getZuoraEntityIds(); } if (headers.getIdempotencyKey() != null) { this.idempotencyKey = headers.getIdempotencyKey(); } if (headers.getAcceptEncoding() != null) { this.acceptEncoding = headers.getAcceptEncoding(); } if (headers.getContentEncoding() != null) { this.contentEncoding = headers.getContentEncoding(); } if (headers.getZuoraOrgIds() != null) { this.zuoraOrgIds = headers.getZuoraOrgIds(); } return this; } /** * Set fields * @param fields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `fulfillment_id`, `description`, `fulfillment_item_number` </details> (optional) * @return UpdateFulfillmentItemParams */ public UpdateFulfillmentItemParams fields(List fields) { this.fields = fields; return this; } /** * Set fulfillmentItemFields * @param fulfillmentItemFields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `fulfillment_id`, `description`, `fulfillment_item_number` </details> (optional) * @return UpdateFulfillmentItemParams */ public UpdateFulfillmentItemParams fulfillmentItemFields(List fulfillmentItemFields) { this.fulfillmentItemFields = fulfillmentItemFields; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. See the [Expand responses](https://developer.zuora.com/quickstart-api/tutorial/expand-responses/) section of the Quickstart API Tutorials for detailed instructions. (optional) * @return UpdateFulfillmentItemParams */ public UpdateFulfillmentItemParams expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. See the [Filter lists](https://developer.zuora.com/quickstart-api/tutorial/filter-lists/) section of the Quickstart API Tutorial for detailed instructions. Note that the filters on this operation are only applicable to the related objects. For example, when you are calling the \"Retrieve a billing document\" operation, you can use the `filter[]` parameter on the related objects such as `filter[]=items[account_id].EQ:8ad09e208858b5cf0188595208151c63` (optional) * @return UpdateFulfillmentItemParams */ public UpdateFulfillmentItemParams filter(List filter) { this.filter = filter; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 99, Zuora will return a 400 error. (optional) * @return UpdateFulfillmentItemParams */ public UpdateFulfillmentItemParams pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } } /** * Update a fulfillment item * Updates the specified fulfillment item by setting the values of the fields passed. Any fields not provided remain unchanged. * @param fulfillmentItemId ID of the fulfillment item. (required) * @param fulfillmentItemPatchRequest (required) * @return FulfillmentItem * @http.response.details
Status Code Description Response Headers
200 Default Response * ratelimit-limit - The request limit quota for the time window closest to exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* ratelimit-remaining - The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* ratelimit-reset - The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* zuora-request-id - Zuora’s internal identifier for this request.
* zuora-track-id - A user-supplied identifier for this request. If you supply a `zuora-track-id` as a request header, Zuora returns the `zuora-track-id` as a response header.
400 Bad Request -
401 Unauthorized -
404 Not Found -
405 Method Not Allowed -
429 Too Many Requests -
500 Internal Server Error -
502 Bad Gateway -
503 Service Unavailable -
504 Gateway Timeout -
*/ public UpdateFulfillmentItemParams updateFulfillmentItemParams(String fulfillmentItemId, FulfillmentItemPatchRequest fulfillmentItemPatchRequest) { return new UpdateFulfillmentItemParams(fulfillmentItemId, fulfillmentItemPatchRequest); } public FulfillmentItem updateFulfillmentItem(String fulfillmentItemId, FulfillmentItemPatchRequest fulfillmentItemPatchRequest) throws ApiException { UpdateFulfillmentItemParams params = new UpdateFulfillmentItemParams(fulfillmentItemId, fulfillmentItemPatchRequest); return executeUpdateFulfillmentItemAPICall(params).getData(); } /** * Expose HTTP info public ApiResponse updateFulfillmentItemWithHttpInfo(String fulfillmentItemId, FulfillmentItemPatchRequest fulfillmentItemPatchRequest) throws ApiException { UpdateFulfillmentItemParams params = new UpdateFulfillmentItemParams(fulfillmentItemId, fulfillmentItemPatchRequest); return executeUpdateFulfillmentItemAPICall(params); } **/ /** Legacy Query Params Requests **/ public FulfillmentItem updateFulfillmentItem( String fulfillmentItemId , FulfillmentItemPatchRequest fulfillmentItemPatchRequest , List expand) throws ApiException { UpdateFulfillmentItemParams params = new UpdateFulfillmentItemParams(fulfillmentItemId, fulfillmentItemPatchRequest); params.expand(expand); return executeUpdateFulfillmentItemAPICall(params).getData(); } /* * add header methods */ public FulfillmentItem updateFulfillmentItem(String fulfillmentItemId , FulfillmentItemPatchRequest fulfillmentItemPatchRequest ,List expand,Headers headers) throws ApiException { UpdateFulfillmentItemParams params = new UpdateFulfillmentItemParams(fulfillmentItemId, fulfillmentItemPatchRequest) .expand(expand) .headers(headers); return executeUpdateFulfillmentItemAPICall(params).getData(); } /** * Update a fulfillment item * Updates the specified fulfillment item by setting the values of the fields passed. Any fields not provided remain unchanged. * @param params UpdateFulfillmentItemParams * @return FulfillmentItem * @http.response.details
Status Code Description Response Headers
200 Default Response * ratelimit-limit - The request limit quota for the time window closest to exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* ratelimit-remaining - The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* ratelimit-reset - The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* zuora-request-id - Zuora’s internal identifier for this request.
* zuora-track-id - A user-supplied identifier for this request. If you supply a `zuora-track-id` as a request header, Zuora returns the `zuora-track-id` as a response header.
400 Bad Request -
401 Unauthorized -
404 Not Found -
405 Method Not Allowed -
429 Too Many Requests -
500 Internal Server Error -
502 Bad Gateway -
503 Service Unavailable -
504 Gateway Timeout -
*/ public FulfillmentItem update(UpdateFulfillmentItemParams params) throws ApiException { return executeUpdateFulfillmentItemAPICall(params).getData(); } public ApiResponse updateWithHttpInfo(UpdateFulfillmentItemParams params) throws ApiException { return executeUpdateFulfillmentItemAPICall(params); } ApiResponse executeUpdateFulfillmentItemAPICall(UpdateFulfillmentItemParams params) throws ApiException { return updateFulfillmentItemWithHttpInfo(params.fulfillmentItemId, params.fulfillmentItemPatchRequest, params.fields, params.fulfillmentItemFields, params.expand, params.filter, params.pageSize, params.zuoraTrackId, params.async, params.zuoraCacheEnabled, params.zuoraEntityIds, params.idempotencyKey, params.acceptEncoding, params.contentEncoding, params.zuoraOrgIds); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy