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

org.openapitools.client.api.FulfillmentsApi 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.FilfillmentListResponse;
import org.openapitools.client.model.Fulfillment;
import org.openapitools.client.model.FulfillmentCreateBulkRequest;
import org.openapitools.client.model.FulfillmentCreateBulkResponse;
import org.openapitools.client.model.FulfillmentCreateRequest;
import org.openapitools.client.model.FulfillmentPatchRequest;

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

    public FulfillmentsApi(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 createFulfillmentCall(FulfillmentCreateRequest fulfillmentCreateRequest, List fields, List fulfillmentFields, List fulfillmentItemFields, List creditMemoItemFields, List invoiceItemFields, 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 = fulfillmentCreateRequest;

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


        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 (fulfillmentFields != null) {
                localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "fulfillment.fields[]", fulfillmentFields));
                    }

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

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

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

                    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 createFulfillmentValidateBeforeCall(FulfillmentCreateRequest fulfillmentCreateRequest, List fields, List fulfillmentFields, List fulfillmentItemFields, List creditMemoItemFields, List invoiceItemFields, 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 'fulfillmentCreateRequest' is set
                        if (fulfillmentCreateRequest == null) {
                        throw new ApiException("Missing the required parameter 'fulfillmentCreateRequest' when calling createFulfillment(Async)");
                        }

                return createFulfillmentCall(fulfillmentCreateRequest, fields, fulfillmentFields, fulfillmentItemFields, creditMemoItemFields, invoiceItemFields, expand, filter, pageSize, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback);
            }

        private ApiResponse createFulfillmentWithHttpInfo(FulfillmentCreateRequest fulfillmentCreateRequest, List fields, List fulfillmentFields, List fulfillmentItemFields, List creditMemoItemFields, List invoiceItemFields, 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 = createFulfillmentValidateBeforeCall(fulfillmentCreateRequest, fields, fulfillmentFields, fulfillmentItemFields, creditMemoItemFields, invoiceItemFields, 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 createFulfillmentAsync(FulfillmentCreateRequest fulfillmentCreateRequest, List fields, List fulfillmentFields, List fulfillmentItemFields, List creditMemoItemFields, List invoiceItemFields, 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 = createFulfillmentValidateBeforeCall(fulfillmentCreateRequest, fields, fulfillmentFields, fulfillmentItemFields, creditMemoItemFields, invoiceItemFields, 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 CreateFulfillmentParams {
                    private final FulfillmentCreateRequest fulfillmentCreateRequest;
            private Headers headers;
            /*
        * Check for list params
            */
                private GetByIdQueryParams getByIdQueryParams;
                    private List fields;
                    private List fulfillmentFields;
                    private List fulfillmentItemFields;
                    private List creditMemoItemFields;
                    private List invoiceItemFields;
                    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 CreateFulfillmentParams(FulfillmentCreateRequest fulfillmentCreateRequest) {
                    this.fulfillmentCreateRequest = fulfillmentCreateRequest;
                }
                    /**
                    * Set getByIdQueryParams
                    * @param getByIdQueryParams GetByIdQueryParams
                    * @return CreateFulfillmentParams
                    */
                    public CreateFulfillmentParams 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 CreateFulfillmentParams
            */
            public CreateFulfillmentParams 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`, `state`, `description`, `quantity`, `order_line_item_id`, `fulfillment_number`, `revenue`, `fulfillment_date`, `tracking_number`, `carrier`, `fulfillment_system`, `location`, `external_id`, `type`, `target_date`          </details> (optional)
                    * @return CreateFulfillmentParams
                    */
                    public CreateFulfillmentParams fields(List fields) {
                    this.fields = fields;
                    return this;
                    }
                    /**
                    * Set fulfillmentFields
                    * @param fulfillmentFields 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`, `state`, `description`, `quantity`, `order_line_item_id`, `fulfillment_number`, `revenue`, `fulfillment_date`, `tracking_number`, `carrier`, `fulfillment_system`, `location`, `external_id`, `type`, `target_date`          </details> (optional)
                    * @return CreateFulfillmentParams
                    */
                    public CreateFulfillmentParams fulfillmentFields(List fulfillmentFields) {
                    this.fulfillmentFields = fulfillmentFields;
                    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 CreateFulfillmentParams
                    */
                    public CreateFulfillmentParams fulfillmentItemFields(List fulfillmentItemFields) {
                    this.fulfillmentItemFields = fulfillmentItemFields;
                    return this;
                    }
                    /**
                    * Set creditMemoItemFields
                    * @param creditMemoItemFields Allows you to specify which fields are returned in the response.          <details>            <summary> Accepted values </summary>              `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `amount`, `applied_to_item_id`, `price_id`, `discount_item`, `deferred_revenue_account`, `description`, `credit_memo_id`, `sku`, `name`, `purchase_order_number`, `quantity`, `recognized_revenue_account`, `remaining_balance`, `revenue_recognition_rule_name`, `service_end`, `service_start`, `accounts_receivable_account`, `on_account_account`, `subscription_id`, `subscription_item_id`, `tax`, `tax_code`, `tax_inclusive`, `unit_amount`, `unit_of_measure`, `subtotal`, `invoice_item_id`, `document_item_date`          </details> (optional)
                    * @return CreateFulfillmentParams
                    */
                    public CreateFulfillmentParams creditMemoItemFields(List creditMemoItemFields) {
                    this.creditMemoItemFields = creditMemoItemFields;
                    return this;
                    }
                    /**
                    * Set invoiceItemFields
                    * @param invoiceItemFields Allows you to specify which fields are returned in the response.          <details>            <summary> Accepted values </summary>              `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `amount`, `booking_reference`, `applied_to_item_id`, `price_id`, `discount_item`, `deferred_revenue_account`, `description`, `invoice_id`, `sku`, `name`, `purchase_order_number`, `quantity`, `recognized_revenue_account`, `remaining_balance`, `revenue_recognition_rule_name`, `accounting_code`, `service_end`, `service_start`, `accounts_receivable_account`, `subscription_id`, `subscription_item_id`, `tax`, `tax_code`, `tax_inclusive`, `unit_amount`, `unit_of_measure`, `document_item_date`          </details> (optional)
                    * @return CreateFulfillmentParams
                    */
                    public CreateFulfillmentParams invoiceItemFields(List invoiceItemFields) {
                    this.invoiceItemFields = invoiceItemFields;
                    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 CreateFulfillmentParams
                    */
                    public CreateFulfillmentParams 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 CreateFulfillmentParams
                    */
                    public CreateFulfillmentParams 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 CreateFulfillmentParams
                    */
                    public CreateFulfillmentParams pageSize(Integer pageSize) {
                    this.pageSize = pageSize;
                    return this;
                    }
                }

            /**
            * Create a fulfillment
            * Creates a new fulfillment object.
                * @param fulfillmentCreateRequest  (required)
            * @return Fulfillment
                * @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 CreateFulfillmentParams createFulfillmentParams(FulfillmentCreateRequest fulfillmentCreateRequest) { return new CreateFulfillmentParams(fulfillmentCreateRequest); } public Fulfillment createFulfillment(FulfillmentCreateRequest fulfillmentCreateRequest) throws ApiException { CreateFulfillmentParams params = new CreateFulfillmentParams(fulfillmentCreateRequest); return executeCreateFulfillmentAPICall(params).getData(); } /** * Expose HTTP info public ApiResponse createFulfillmentWithHttpInfo(FulfillmentCreateRequest fulfillmentCreateRequest) throws ApiException { CreateFulfillmentParams params = new CreateFulfillmentParams(fulfillmentCreateRequest); return executeCreateFulfillmentAPICall(params); } **/ /** Legacy Query Params Requests **/ public Fulfillment createFulfillment( FulfillmentCreateRequest fulfillmentCreateRequest , List expand) throws ApiException { CreateFulfillmentParams params = new CreateFulfillmentParams(fulfillmentCreateRequest); params.expand(expand); return executeCreateFulfillmentAPICall(params).getData(); } /* * add header methods */ public Fulfillment createFulfillment(FulfillmentCreateRequest fulfillmentCreateRequest ,List expand,Headers headers) throws ApiException { CreateFulfillmentParams params = new CreateFulfillmentParams(fulfillmentCreateRequest) .expand(expand) .headers(headers); return executeCreateFulfillmentAPICall(params).getData(); } /** * Create a fulfillment * Creates a new fulfillment object. * @param params CreateFulfillmentParams * @return Fulfillment * @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 Fulfillment create(CreateFulfillmentParams params) throws ApiException { return executeCreateFulfillmentAPICall(params).getData(); } public ApiResponse createWithHttpInfo(CreateFulfillmentParams params) throws ApiException { return executeCreateFulfillmentAPICall(params); } ApiResponse executeCreateFulfillmentAPICall(CreateFulfillmentParams params) throws ApiException { return createFulfillmentWithHttpInfo(params.fulfillmentCreateRequest, params.fields, params.fulfillmentFields, params.fulfillmentItemFields, params.creditMemoItemFields, params.invoiceItemFields, 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 createFulfillmentsCall(FulfillmentCreateBulkRequest fulfillmentCreateBulkRequest, List fields, List fulfillmentFields, List fulfillmentItemFields, List creditMemoItemFields, List invoiceItemFields, 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 = fulfillmentCreateBulkRequest; // create path and map variables String localVarPath = "/fulfillments/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 (fulfillmentFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "fulfillment.fields[]", fulfillmentFields)); } if (fulfillmentItemFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "fulfillment_item.fields[]", fulfillmentItemFields)); } if (creditMemoItemFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "credit_memo_item.fields[]", creditMemoItemFields)); } if (invoiceItemFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "invoice_item.fields[]", invoiceItemFields)); } 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 createFulfillmentsValidateBeforeCall(FulfillmentCreateBulkRequest fulfillmentCreateBulkRequest, List fields, List fulfillmentFields, List fulfillmentItemFields, List creditMemoItemFields, List invoiceItemFields, 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 'fulfillmentCreateBulkRequest' is set if (fulfillmentCreateBulkRequest == null) { throw new ApiException("Missing the required parameter 'fulfillmentCreateBulkRequest' when calling createFulfillments(Async)"); } return createFulfillmentsCall(fulfillmentCreateBulkRequest, fields, fulfillmentFields, fulfillmentItemFields, creditMemoItemFields, invoiceItemFields, expand, filter, pageSize, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback); } private ApiResponse createFulfillmentsWithHttpInfo(FulfillmentCreateBulkRequest fulfillmentCreateBulkRequest, List fields, List fulfillmentFields, List fulfillmentItemFields, List creditMemoItemFields, List invoiceItemFields, 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 = createFulfillmentsValidateBeforeCall(fulfillmentCreateBulkRequest, fields, fulfillmentFields, fulfillmentItemFields, creditMemoItemFields, invoiceItemFields, 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 createFulfillmentsAsync(FulfillmentCreateBulkRequest fulfillmentCreateBulkRequest, List fields, List fulfillmentFields, List fulfillmentItemFields, List creditMemoItemFields, List invoiceItemFields, 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 = createFulfillmentsValidateBeforeCall(fulfillmentCreateBulkRequest, fields, fulfillmentFields, fulfillmentItemFields, creditMemoItemFields, invoiceItemFields, 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 CreateFulfillmentsParams { private final FulfillmentCreateBulkRequest fulfillmentCreateBulkRequest; private Headers headers; /* * Check for list params */ private GetByIdQueryParams getByIdQueryParams; private List fields; private List fulfillmentFields; private List fulfillmentItemFields; private List creditMemoItemFields; private List invoiceItemFields; 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 CreateFulfillmentsParams(FulfillmentCreateBulkRequest fulfillmentCreateBulkRequest) { this.fulfillmentCreateBulkRequest = fulfillmentCreateBulkRequest; } /** * Set getByIdQueryParams * @param getByIdQueryParams GetByIdQueryParams * @return CreateFulfillmentsParams */ public CreateFulfillmentsParams 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 CreateFulfillmentsParams */ public CreateFulfillmentsParams 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`, `state`, `description`, `quantity`, `order_line_item_id`, `fulfillment_number`, `revenue`, `fulfillment_date`, `tracking_number`, `carrier`, `fulfillment_system`, `location`, `external_id`, `type`, `target_date` </details> (optional) * @return CreateFulfillmentsParams */ public CreateFulfillmentsParams fields(List fields) { this.fields = fields; return this; } /** * Set fulfillmentFields * @param fulfillmentFields 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`, `state`, `description`, `quantity`, `order_line_item_id`, `fulfillment_number`, `revenue`, `fulfillment_date`, `tracking_number`, `carrier`, `fulfillment_system`, `location`, `external_id`, `type`, `target_date` </details> (optional) * @return CreateFulfillmentsParams */ public CreateFulfillmentsParams fulfillmentFields(List fulfillmentFields) { this.fulfillmentFields = fulfillmentFields; 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 CreateFulfillmentsParams */ public CreateFulfillmentsParams fulfillmentItemFields(List fulfillmentItemFields) { this.fulfillmentItemFields = fulfillmentItemFields; return this; } /** * Set creditMemoItemFields * @param creditMemoItemFields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `amount`, `applied_to_item_id`, `price_id`, `discount_item`, `deferred_revenue_account`, `description`, `credit_memo_id`, `sku`, `name`, `purchase_order_number`, `quantity`, `recognized_revenue_account`, `remaining_balance`, `revenue_recognition_rule_name`, `service_end`, `service_start`, `accounts_receivable_account`, `on_account_account`, `subscription_id`, `subscription_item_id`, `tax`, `tax_code`, `tax_inclusive`, `unit_amount`, `unit_of_measure`, `subtotal`, `invoice_item_id`, `document_item_date` </details> (optional) * @return CreateFulfillmentsParams */ public CreateFulfillmentsParams creditMemoItemFields(List creditMemoItemFields) { this.creditMemoItemFields = creditMemoItemFields; return this; } /** * Set invoiceItemFields * @param invoiceItemFields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `amount`, `booking_reference`, `applied_to_item_id`, `price_id`, `discount_item`, `deferred_revenue_account`, `description`, `invoice_id`, `sku`, `name`, `purchase_order_number`, `quantity`, `recognized_revenue_account`, `remaining_balance`, `revenue_recognition_rule_name`, `accounting_code`, `service_end`, `service_start`, `accounts_receivable_account`, `subscription_id`, `subscription_item_id`, `tax`, `tax_code`, `tax_inclusive`, `unit_amount`, `unit_of_measure`, `document_item_date` </details> (optional) * @return CreateFulfillmentsParams */ public CreateFulfillmentsParams invoiceItemFields(List invoiceItemFields) { this.invoiceItemFields = invoiceItemFields; 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 CreateFulfillmentsParams */ public CreateFulfillmentsParams 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 CreateFulfillmentsParams */ public CreateFulfillmentsParams 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 CreateFulfillmentsParams */ public CreateFulfillmentsParams pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } } /** * Create fulfillments * Creates multiple fulfillments. * @param fulfillmentCreateBulkRequest (required) * @return FulfillmentCreateBulkResponse * @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 CreateFulfillmentsParams createFulfillmentsParams(FulfillmentCreateBulkRequest fulfillmentCreateBulkRequest) { return new CreateFulfillmentsParams(fulfillmentCreateBulkRequest); } public FulfillmentCreateBulkResponse createFulfillments(FulfillmentCreateBulkRequest fulfillmentCreateBulkRequest) throws ApiException { CreateFulfillmentsParams params = new CreateFulfillmentsParams(fulfillmentCreateBulkRequest); return executeCreateFulfillmentsAPICall(params).getData(); } /** * Expose HTTP info public ApiResponse createFulfillmentsWithHttpInfo(FulfillmentCreateBulkRequest fulfillmentCreateBulkRequest) throws ApiException { CreateFulfillmentsParams params = new CreateFulfillmentsParams(fulfillmentCreateBulkRequest); return executeCreateFulfillmentsAPICall(params); } **/ /** Legacy Query Params Requests **/ public FulfillmentCreateBulkResponse createFulfillments( FulfillmentCreateBulkRequest fulfillmentCreateBulkRequest , List expand) throws ApiException { CreateFulfillmentsParams params = new CreateFulfillmentsParams(fulfillmentCreateBulkRequest); params.expand(expand); return executeCreateFulfillmentsAPICall(params).getData(); } /* * add header methods */ public FulfillmentCreateBulkResponse createFulfillments(FulfillmentCreateBulkRequest fulfillmentCreateBulkRequest ,List expand,Headers headers) throws ApiException { CreateFulfillmentsParams params = new CreateFulfillmentsParams(fulfillmentCreateBulkRequest) .expand(expand) .headers(headers); return executeCreateFulfillmentsAPICall(params).getData(); } /** * Create fulfillments * Creates multiple fulfillments. * @param params CreateFulfillmentsParams * @return FulfillmentCreateBulkResponse * @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 FulfillmentCreateBulkResponse bulkCreate(CreateFulfillmentsParams params) throws ApiException { return executeCreateFulfillmentsAPICall(params).getData(); } public ApiResponse bulkCreateWithHttpInfo(CreateFulfillmentsParams params) throws ApiException { return executeCreateFulfillmentsAPICall(params); } ApiResponse executeCreateFulfillmentsAPICall(CreateFulfillmentsParams params) throws ApiException { return createFulfillmentsWithHttpInfo(params.fulfillmentCreateBulkRequest, params.fields, params.fulfillmentFields, params.fulfillmentItemFields, params.creditMemoItemFields, params.invoiceItemFields, 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 deleteFulfillmentCall(String fulfillmentId, 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/{fulfillment_id}" .replace("{" + "fulfillment_id" + "}", localVarApiClient.escapeString(fulfillmentId.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 deleteFulfillmentValidateBeforeCall(String fulfillmentId, 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 'fulfillmentId' is set if (fulfillmentId == null) { throw new ApiException("Missing the required parameter 'fulfillmentId' when calling deleteFulfillment(Async)"); } return deleteFulfillmentCall(fulfillmentId, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback); } private ApiResponse deleteFulfillmentWithHttpInfo(String fulfillmentId, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds) throws ApiException { okhttp3.Call localVarCall = deleteFulfillmentValidateBeforeCall(fulfillmentId, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, null); return localVarApiClient.execute(localVarCall); } private okhttp3.Call deleteFulfillmentAsync(String fulfillmentId, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteFulfillmentValidateBeforeCall(fulfillmentId, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } public static class DeleteFulfillmentParams { private final String fulfillmentId; 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 DeleteFulfillmentParams(String fulfillmentId) { this.fulfillmentId = fulfillmentId; } /** * Set headers * @param headers Headers * @return DeleteFulfillmentParams */ public DeleteFulfillmentParams 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 * Permanently deletes a fulfillment. It cannot be undone. * @param fulfillmentId ID of the fulfillment. (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 DeleteFulfillmentParams deleteFulfillmentParams(String fulfillmentId) { return new DeleteFulfillmentParams(fulfillmentId); } public void deleteFulfillment(String fulfillmentId) throws ApiException { DeleteFulfillmentParams params = new DeleteFulfillmentParams(fulfillmentId); executeDeleteFulfillmentAPICall(params); } /** * Expose HTTP info public ApiResponse deleteFulfillmentWithHttpInfo(String fulfillmentId) throws ApiException { DeleteFulfillmentParams params = new DeleteFulfillmentParams(fulfillmentId); return executeDeleteFulfillmentAPICall(params); } **/ /** Legacy Query Params Requests **/ /* * add header methods */ public void deleteFulfillment(String fulfillmentId ,Headers headers) throws ApiException { DeleteFulfillmentParams params = new DeleteFulfillmentParams(fulfillmentId) .headers(headers); executeDeleteFulfillmentAPICall(params); } /** * Delete a fulfillment * Permanently deletes a fulfillment. It cannot be undone. * @param params DeleteFulfillmentParams * @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(DeleteFulfillmentParams params) throws ApiException { executeDeleteFulfillmentAPICall(params).getData(); } public ApiResponse deleteWithHttpInfo(DeleteFulfillmentParams params) throws ApiException { return executeDeleteFulfillmentAPICall(params); } ApiResponse executeDeleteFulfillmentAPICall(DeleteFulfillmentParams params) throws ApiException { return deleteFulfillmentWithHttpInfo(params.fulfillmentId, params.zuoraTrackId, params.async, params.zuoraCacheEnabled, params.zuoraEntityIds, params.idempotencyKey, params.acceptEncoding, params.contentEncoding, params.zuoraOrgIds); } private okhttp3.Call getFulfillmentCall(String fulfillmentId, List fields, List fulfillmentFields, List fulfillmentItemFields, List creditMemoItemFields, List invoiceItemFields, 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/{fulfillment_id}" .replace("{" + "fulfillment_id" + "}", localVarApiClient.escapeString(fulfillmentId.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 (fulfillmentFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "fulfillment.fields[]", fulfillmentFields)); } if (fulfillmentItemFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "fulfillment_item.fields[]", fulfillmentItemFields)); } if (creditMemoItemFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "credit_memo_item.fields[]", creditMemoItemFields)); } if (invoiceItemFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "invoice_item.fields[]", invoiceItemFields)); } 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 getFulfillmentValidateBeforeCall(String fulfillmentId, List fields, List fulfillmentFields, List fulfillmentItemFields, List creditMemoItemFields, List invoiceItemFields, 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 'fulfillmentId' is set if (fulfillmentId == null) { throw new ApiException("Missing the required parameter 'fulfillmentId' when calling getFulfillment(Async)"); } return getFulfillmentCall(fulfillmentId, fields, fulfillmentFields, fulfillmentItemFields, creditMemoItemFields, invoiceItemFields, expand, filter, pageSize, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback); } private ApiResponse getFulfillmentWithHttpInfo(String fulfillmentId, List fields, List fulfillmentFields, List fulfillmentItemFields, List creditMemoItemFields, List invoiceItemFields, 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 = getFulfillmentValidateBeforeCall(fulfillmentId, fields, fulfillmentFields, fulfillmentItemFields, creditMemoItemFields, invoiceItemFields, 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 getFulfillmentAsync(String fulfillmentId, List fields, List fulfillmentFields, List fulfillmentItemFields, List creditMemoItemFields, List invoiceItemFields, 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 = getFulfillmentValidateBeforeCall(fulfillmentId, fields, fulfillmentFields, fulfillmentItemFields, creditMemoItemFields, invoiceItemFields, 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 GetFulfillmentParams { private final String fulfillmentId; private Headers headers; /* * Check for list params */ private GetByIdQueryParams getByIdQueryParams; private List fields; private List fulfillmentFields; private List fulfillmentItemFields; private List creditMemoItemFields; private List invoiceItemFields; 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 GetFulfillmentParams(String fulfillmentId) { this.fulfillmentId = fulfillmentId; } /** * Set getByIdQueryParams * @param getByIdQueryParams GetByIdQueryParams * @return GetFulfillmentParams */ public GetFulfillmentParams 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 GetFulfillmentParams */ public GetFulfillmentParams 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`, `state`, `description`, `quantity`, `order_line_item_id`, `fulfillment_number`, `revenue`, `fulfillment_date`, `tracking_number`, `carrier`, `fulfillment_system`, `location`, `external_id`, `type`, `target_date` </details> (optional) * @return GetFulfillmentParams */ public GetFulfillmentParams fields(List fields) { this.fields = fields; return this; } /** * Set fulfillmentFields * @param fulfillmentFields 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`, `state`, `description`, `quantity`, `order_line_item_id`, `fulfillment_number`, `revenue`, `fulfillment_date`, `tracking_number`, `carrier`, `fulfillment_system`, `location`, `external_id`, `type`, `target_date` </details> (optional) * @return GetFulfillmentParams */ public GetFulfillmentParams fulfillmentFields(List fulfillmentFields) { this.fulfillmentFields = fulfillmentFields; 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 GetFulfillmentParams */ public GetFulfillmentParams fulfillmentItemFields(List fulfillmentItemFields) { this.fulfillmentItemFields = fulfillmentItemFields; return this; } /** * Set creditMemoItemFields * @param creditMemoItemFields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `amount`, `applied_to_item_id`, `price_id`, `discount_item`, `deferred_revenue_account`, `description`, `credit_memo_id`, `sku`, `name`, `purchase_order_number`, `quantity`, `recognized_revenue_account`, `remaining_balance`, `revenue_recognition_rule_name`, `service_end`, `service_start`, `accounts_receivable_account`, `on_account_account`, `subscription_id`, `subscription_item_id`, `tax`, `tax_code`, `tax_inclusive`, `unit_amount`, `unit_of_measure`, `subtotal`, `invoice_item_id`, `document_item_date` </details> (optional) * @return GetFulfillmentParams */ public GetFulfillmentParams creditMemoItemFields(List creditMemoItemFields) { this.creditMemoItemFields = creditMemoItemFields; return this; } /** * Set invoiceItemFields * @param invoiceItemFields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `amount`, `booking_reference`, `applied_to_item_id`, `price_id`, `discount_item`, `deferred_revenue_account`, `description`, `invoice_id`, `sku`, `name`, `purchase_order_number`, `quantity`, `recognized_revenue_account`, `remaining_balance`, `revenue_recognition_rule_name`, `accounting_code`, `service_end`, `service_start`, `accounts_receivable_account`, `subscription_id`, `subscription_item_id`, `tax`, `tax_code`, `tax_inclusive`, `unit_amount`, `unit_of_measure`, `document_item_date` </details> (optional) * @return GetFulfillmentParams */ public GetFulfillmentParams invoiceItemFields(List invoiceItemFields) { this.invoiceItemFields = invoiceItemFields; 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 GetFulfillmentParams */ public GetFulfillmentParams 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 GetFulfillmentParams */ public GetFulfillmentParams 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 GetFulfillmentParams */ public GetFulfillmentParams pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } } /** * Retrieve a fulfillment * Retrieves the fulfillment with the given ID. * @param fulfillmentId ID of the fulfillment. (required) * @return Fulfillment * @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 GetFulfillmentParams getFulfillmentParams(String fulfillmentId) { return new GetFulfillmentParams(fulfillmentId); } public Fulfillment getFulfillment(String fulfillmentId) throws ApiException { GetFulfillmentParams params = new GetFulfillmentParams(fulfillmentId); return executeGetFulfillmentAPICall(params).getData(); } /** * Expose HTTP info public ApiResponse getFulfillmentWithHttpInfo(String fulfillmentId) throws ApiException { GetFulfillmentParams params = new GetFulfillmentParams(fulfillmentId); return executeGetFulfillmentAPICall(params); } **/ /** Legacy Query Params Requests **/ public Fulfillment getFulfillment( String fulfillmentId , List expand) throws ApiException { GetFulfillmentParams params = new GetFulfillmentParams(fulfillmentId); params.expand(expand); return executeGetFulfillmentAPICall(params).getData(); } /* * add header methods */ public Fulfillment getFulfillment(String fulfillmentId ,List expand,Headers headers) throws ApiException { GetFulfillmentParams params = new GetFulfillmentParams(fulfillmentId) .expand(expand) .headers(headers); return executeGetFulfillmentAPICall(params).getData(); } /** * Retrieve a fulfillment * Retrieves the fulfillment with the given ID. * @param params GetFulfillmentParams * @return Fulfillment * @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 Fulfillment get(GetFulfillmentParams params) throws ApiException { return executeGetFulfillmentAPICall(params).getData(); } public ApiResponse getWithHttpInfo(GetFulfillmentParams params) throws ApiException { return executeGetFulfillmentAPICall(params); } ApiResponse executeGetFulfillmentAPICall(GetFulfillmentParams params) throws ApiException { return getFulfillmentWithHttpInfo(params.fulfillmentId, params.fields, params.fulfillmentFields, params.fulfillmentItemFields, params.creditMemoItemFields, params.invoiceItemFields, 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 getFulfillmentsCall(String cursor, List expand, List filter, List sort, Integer pageSize, List fields, List fulfillmentFields, List fulfillmentItemFields, List creditMemoItemFields, List invoiceItemFields, 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"; 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 (fulfillmentFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "fulfillment.fields[]", fulfillmentFields)); } if (fulfillmentItemFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "fulfillment_item.fields[]", fulfillmentItemFields)); } if (creditMemoItemFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "credit_memo_item.fields[]", creditMemoItemFields)); } if (invoiceItemFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "invoice_item.fields[]", invoiceItemFields)); } 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 getFulfillmentsValidateBeforeCall(String cursor, List expand, List filter, List sort, Integer pageSize, List fields, List fulfillmentFields, List fulfillmentItemFields, List creditMemoItemFields, List invoiceItemFields, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { return getFulfillmentsCall(cursor, expand, filter, sort, pageSize, fields, fulfillmentFields, fulfillmentItemFields, creditMemoItemFields, invoiceItemFields, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback); } private ApiResponse getFulfillmentsWithHttpInfo(String cursor, List expand, List filter, List sort, Integer pageSize, List fields, List fulfillmentFields, List fulfillmentItemFields, List creditMemoItemFields, List invoiceItemFields, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds) throws ApiException { okhttp3.Call localVarCall = getFulfillmentsValidateBeforeCall(cursor, expand, filter, sort, pageSize, fields, fulfillmentFields, fulfillmentItemFields, creditMemoItemFields, invoiceItemFields, 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 getFulfillmentsAsync(String cursor, List expand, List filter, List sort, Integer pageSize, List fields, List fulfillmentFields, List fulfillmentItemFields, List creditMemoItemFields, List invoiceItemFields, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getFulfillmentsValidateBeforeCall(cursor, expand, filter, sort, pageSize, fields, fulfillmentFields, fulfillmentItemFields, creditMemoItemFields, invoiceItemFields, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public static class GetFulfillmentsParams { 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 fulfillmentFields; private List fulfillmentItemFields; private List creditMemoItemFields; private List invoiceItemFields; 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 GetFulfillmentsParams() { } /** * Set listQueryParams * @param listQueryParams ListQueryParams * @return GetFulfillmentsParams */ public GetFulfillmentsParams 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 GetFulfillmentsParams */ public GetFulfillmentsParams 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 GetFulfillmentsParams */ public GetFulfillmentsParams 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 GetFulfillmentsParams */ public GetFulfillmentsParams 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 GetFulfillmentsParams */ public GetFulfillmentsParams 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 GetFulfillmentsParams */ public GetFulfillmentsParams 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 GetFulfillmentsParams */ public GetFulfillmentsParams 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`, `state`, `description`, `quantity`, `order_line_item_id`, `fulfillment_number`, `revenue`, `fulfillment_date`, `tracking_number`, `carrier`, `fulfillment_system`, `location`, `external_id`, `type`, `target_date` </details> (optional) * @return GetFulfillmentsParams */ public GetFulfillmentsParams fields(List fields) { this.fields = fields; return this; } /** * Set fulfillmentFields * @param fulfillmentFields 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`, `state`, `description`, `quantity`, `order_line_item_id`, `fulfillment_number`, `revenue`, `fulfillment_date`, `tracking_number`, `carrier`, `fulfillment_system`, `location`, `external_id`, `type`, `target_date` </details> (optional) * @return GetFulfillmentsParams */ public GetFulfillmentsParams fulfillmentFields(List fulfillmentFields) { this.fulfillmentFields = fulfillmentFields; 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 GetFulfillmentsParams */ public GetFulfillmentsParams fulfillmentItemFields(List fulfillmentItemFields) { this.fulfillmentItemFields = fulfillmentItemFields; return this; } /** * Set creditMemoItemFields * @param creditMemoItemFields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `amount`, `applied_to_item_id`, `price_id`, `discount_item`, `deferred_revenue_account`, `description`, `credit_memo_id`, `sku`, `name`, `purchase_order_number`, `quantity`, `recognized_revenue_account`, `remaining_balance`, `revenue_recognition_rule_name`, `service_end`, `service_start`, `accounts_receivable_account`, `on_account_account`, `subscription_id`, `subscription_item_id`, `tax`, `tax_code`, `tax_inclusive`, `unit_amount`, `unit_of_measure`, `subtotal`, `invoice_item_id`, `document_item_date` </details> (optional) * @return GetFulfillmentsParams */ public GetFulfillmentsParams creditMemoItemFields(List creditMemoItemFields) { this.creditMemoItemFields = creditMemoItemFields; return this; } /** * Set invoiceItemFields * @param invoiceItemFields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `amount`, `booking_reference`, `applied_to_item_id`, `price_id`, `discount_item`, `deferred_revenue_account`, `description`, `invoice_id`, `sku`, `name`, `purchase_order_number`, `quantity`, `recognized_revenue_account`, `remaining_balance`, `revenue_recognition_rule_name`, `accounting_code`, `service_end`, `service_start`, `accounts_receivable_account`, `subscription_id`, `subscription_item_id`, `tax`, `tax_code`, `tax_inclusive`, `unit_amount`, `unit_of_measure`, `document_item_date` </details> (optional) * @return GetFulfillmentsParams */ public GetFulfillmentsParams invoiceItemFields(List invoiceItemFields) { this.invoiceItemFields = invoiceItemFields; return this; } } /** * List fulfilllments * Returns a dictionary with a data property that contains an array of fulfillments, starting after the cursor, if used. Each entry in the array is a separate fulfillment object. If no more fulfillment are available, the resulting array will be empty. This request should never return an error. * @return FilfillmentListResponse * @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 GetFulfillmentsParams getFulfillmentsParams() { return new GetFulfillmentsParams(); } public FilfillmentListResponse getFulfillments() throws ApiException { GetFulfillmentsParams params = new GetFulfillmentsParams(); return executeGetFulfillmentsAPICall(params).getData(); } /** * Expose HTTP info public ApiResponse getFulfillmentsWithHttpInfo() throws ApiException { GetFulfillmentsParams params = new GetFulfillmentsParams(); return executeGetFulfillmentsAPICall(params); } **/ /** Legacy Query Params Requests **/ public FilfillmentListResponse getFulfillments(String cursor, List expand, List filter) throws ApiException { GetFulfillmentsParams params = new GetFulfillmentsParams(); params.cursor(cursor); params.expand(expand); params.filter(filter); return executeGetFulfillmentsAPICall(params).getData(); } /* * add header methods */ public FilfillmentListResponse getFulfillments(String cursor,List expand,List filter,Headers headers) throws ApiException { GetFulfillmentsParams params = new GetFulfillmentsParams() .cursor(cursor) .expand(expand) .filter(filter) .headers(headers); return executeGetFulfillmentsAPICall(params).getData(); } /** * List fulfilllments * Returns a dictionary with a data property that contains an array of fulfillments, starting after the cursor, if used. Each entry in the array is a separate fulfillment object. If no more fulfillment are available, the resulting array will be empty. This request should never return an error. * @param params GetFulfillmentsParams * @return FilfillmentListResponse * @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 FilfillmentListResponse list(GetFulfillmentsParams params) throws ApiException { return executeGetFulfillmentsAPICall(params).getData(); } public ApiResponse listWithHttpInfo(GetFulfillmentsParams params) throws ApiException { return executeGetFulfillmentsAPICall(params); } ApiResponse executeGetFulfillmentsAPICall(GetFulfillmentsParams params) throws ApiException { return getFulfillmentsWithHttpInfo(params.cursor, params.expand, params.filter, params.sort, params.pageSize, params.fields, params.fulfillmentFields, params.fulfillmentItemFields, params.creditMemoItemFields, params.invoiceItemFields, params.zuoraTrackId, params.async, params.zuoraCacheEnabled, params.zuoraEntityIds, params.idempotencyKey, params.acceptEncoding, params.contentEncoding, params.zuoraOrgIds); } private okhttp3.Call updateFulfillmentCall(String fulfillmentId, FulfillmentPatchRequest fulfillmentPatchRequest, List fields, List fulfillmentFields, List fulfillmentItemFields, List creditMemoItemFields, List invoiceItemFields, 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 = fulfillmentPatchRequest; // create path and map variables String localVarPath = "/fulfillments/{fulfillment_id}" .replace("{" + "fulfillment_id" + "}", localVarApiClient.escapeString(fulfillmentId.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 (fulfillmentFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "fulfillment.fields[]", fulfillmentFields)); } if (fulfillmentItemFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "fulfillment_item.fields[]", fulfillmentItemFields)); } if (creditMemoItemFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "credit_memo_item.fields[]", creditMemoItemFields)); } if (invoiceItemFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "invoice_item.fields[]", invoiceItemFields)); } 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 updateFulfillmentValidateBeforeCall(String fulfillmentId, FulfillmentPatchRequest fulfillmentPatchRequest, List fields, List fulfillmentFields, List fulfillmentItemFields, List creditMemoItemFields, List invoiceItemFields, 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 'fulfillmentId' is set if (fulfillmentId == null) { throw new ApiException("Missing the required parameter 'fulfillmentId' when calling updateFulfillment(Async)"); } // verify the required parameter 'fulfillmentPatchRequest' is set if (fulfillmentPatchRequest == null) { throw new ApiException("Missing the required parameter 'fulfillmentPatchRequest' when calling updateFulfillment(Async)"); } return updateFulfillmentCall(fulfillmentId, fulfillmentPatchRequest, fields, fulfillmentFields, fulfillmentItemFields, creditMemoItemFields, invoiceItemFields, expand, filter, pageSize, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback); } private ApiResponse updateFulfillmentWithHttpInfo(String fulfillmentId, FulfillmentPatchRequest fulfillmentPatchRequest, List fields, List fulfillmentFields, List fulfillmentItemFields, List creditMemoItemFields, List invoiceItemFields, 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 = updateFulfillmentValidateBeforeCall(fulfillmentId, fulfillmentPatchRequest, fields, fulfillmentFields, fulfillmentItemFields, creditMemoItemFields, invoiceItemFields, 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 updateFulfillmentAsync(String fulfillmentId, FulfillmentPatchRequest fulfillmentPatchRequest, List fields, List fulfillmentFields, List fulfillmentItemFields, List creditMemoItemFields, List invoiceItemFields, 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 = updateFulfillmentValidateBeforeCall(fulfillmentId, fulfillmentPatchRequest, fields, fulfillmentFields, fulfillmentItemFields, creditMemoItemFields, invoiceItemFields, 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 UpdateFulfillmentParams { private final String fulfillmentId; private final FulfillmentPatchRequest fulfillmentPatchRequest; private Headers headers; /* * Check for list params */ private GetByIdQueryParams getByIdQueryParams; private List fields; private List fulfillmentFields; private List fulfillmentItemFields; private List creditMemoItemFields; private List invoiceItemFields; 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 UpdateFulfillmentParams(String fulfillmentId, FulfillmentPatchRequest fulfillmentPatchRequest) { this.fulfillmentId = fulfillmentId; this.fulfillmentPatchRequest = fulfillmentPatchRequest; } /** * Set getByIdQueryParams * @param getByIdQueryParams GetByIdQueryParams * @return UpdateFulfillmentParams */ public UpdateFulfillmentParams 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 UpdateFulfillmentParams */ public UpdateFulfillmentParams 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`, `state`, `description`, `quantity`, `order_line_item_id`, `fulfillment_number`, `revenue`, `fulfillment_date`, `tracking_number`, `carrier`, `fulfillment_system`, `location`, `external_id`, `type`, `target_date` </details> (optional) * @return UpdateFulfillmentParams */ public UpdateFulfillmentParams fields(List fields) { this.fields = fields; return this; } /** * Set fulfillmentFields * @param fulfillmentFields 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`, `state`, `description`, `quantity`, `order_line_item_id`, `fulfillment_number`, `revenue`, `fulfillment_date`, `tracking_number`, `carrier`, `fulfillment_system`, `location`, `external_id`, `type`, `target_date` </details> (optional) * @return UpdateFulfillmentParams */ public UpdateFulfillmentParams fulfillmentFields(List fulfillmentFields) { this.fulfillmentFields = fulfillmentFields; 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 UpdateFulfillmentParams */ public UpdateFulfillmentParams fulfillmentItemFields(List fulfillmentItemFields) { this.fulfillmentItemFields = fulfillmentItemFields; return this; } /** * Set creditMemoItemFields * @param creditMemoItemFields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `amount`, `applied_to_item_id`, `price_id`, `discount_item`, `deferred_revenue_account`, `description`, `credit_memo_id`, `sku`, `name`, `purchase_order_number`, `quantity`, `recognized_revenue_account`, `remaining_balance`, `revenue_recognition_rule_name`, `service_end`, `service_start`, `accounts_receivable_account`, `on_account_account`, `subscription_id`, `subscription_item_id`, `tax`, `tax_code`, `tax_inclusive`, `unit_amount`, `unit_of_measure`, `subtotal`, `invoice_item_id`, `document_item_date` </details> (optional) * @return UpdateFulfillmentParams */ public UpdateFulfillmentParams creditMemoItemFields(List creditMemoItemFields) { this.creditMemoItemFields = creditMemoItemFields; return this; } /** * Set invoiceItemFields * @param invoiceItemFields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `amount`, `booking_reference`, `applied_to_item_id`, `price_id`, `discount_item`, `deferred_revenue_account`, `description`, `invoice_id`, `sku`, `name`, `purchase_order_number`, `quantity`, `recognized_revenue_account`, `remaining_balance`, `revenue_recognition_rule_name`, `accounting_code`, `service_end`, `service_start`, `accounts_receivable_account`, `subscription_id`, `subscription_item_id`, `tax`, `tax_code`, `tax_inclusive`, `unit_amount`, `unit_of_measure`, `document_item_date` </details> (optional) * @return UpdateFulfillmentParams */ public UpdateFulfillmentParams invoiceItemFields(List invoiceItemFields) { this.invoiceItemFields = invoiceItemFields; 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 UpdateFulfillmentParams */ public UpdateFulfillmentParams 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 UpdateFulfillmentParams */ public UpdateFulfillmentParams 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 UpdateFulfillmentParams */ public UpdateFulfillmentParams pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } } /** * Update a fulfillment * Updates the specified fulfillment by setting the values of the parameters passed. Any parameters not provided will be left unchanged. * @param fulfillmentId ID of the fulfillment. (required) * @param fulfillmentPatchRequest (required) * @return Fulfillment * @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 UpdateFulfillmentParams updateFulfillmentParams(String fulfillmentId, FulfillmentPatchRequest fulfillmentPatchRequest) { return new UpdateFulfillmentParams(fulfillmentId, fulfillmentPatchRequest); } public Fulfillment updateFulfillment(String fulfillmentId, FulfillmentPatchRequest fulfillmentPatchRequest) throws ApiException { UpdateFulfillmentParams params = new UpdateFulfillmentParams(fulfillmentId, fulfillmentPatchRequest); return executeUpdateFulfillmentAPICall(params).getData(); } /** * Expose HTTP info public ApiResponse updateFulfillmentWithHttpInfo(String fulfillmentId, FulfillmentPatchRequest fulfillmentPatchRequest) throws ApiException { UpdateFulfillmentParams params = new UpdateFulfillmentParams(fulfillmentId, fulfillmentPatchRequest); return executeUpdateFulfillmentAPICall(params); } **/ /** Legacy Query Params Requests **/ public Fulfillment updateFulfillment( String fulfillmentId , FulfillmentPatchRequest fulfillmentPatchRequest , List expand) throws ApiException { UpdateFulfillmentParams params = new UpdateFulfillmentParams(fulfillmentId, fulfillmentPatchRequest); params.expand(expand); return executeUpdateFulfillmentAPICall(params).getData(); } /* * add header methods */ public Fulfillment updateFulfillment(String fulfillmentId , FulfillmentPatchRequest fulfillmentPatchRequest ,List expand,Headers headers) throws ApiException { UpdateFulfillmentParams params = new UpdateFulfillmentParams(fulfillmentId, fulfillmentPatchRequest) .expand(expand) .headers(headers); return executeUpdateFulfillmentAPICall(params).getData(); } /** * Update a fulfillment * Updates the specified fulfillment by setting the values of the parameters passed. Any parameters not provided will be left unchanged. * @param params UpdateFulfillmentParams * @return Fulfillment * @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 Fulfillment update(UpdateFulfillmentParams params) throws ApiException { return executeUpdateFulfillmentAPICall(params).getData(); } public ApiResponse updateWithHttpInfo(UpdateFulfillmentParams params) throws ApiException { return executeUpdateFulfillmentAPICall(params); } ApiResponse executeUpdateFulfillmentAPICall(UpdateFulfillmentParams params) throws ApiException { return updateFulfillmentWithHttpInfo(params.fulfillmentId, params.fulfillmentPatchRequest, params.fields, params.fulfillmentFields, params.fulfillmentItemFields, params.creditMemoItemFields, params.invoiceItemFields, 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