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

com.lob.api.client.BuckslipOrdersApi Maven / Gradle / Ivy

The newest version!
/*
 * Lob
 * The Lob API is organized around REST. Our API is designed to have predictable, resource-oriented URLs and uses HTTP response codes to indicate any API errors. 

Looking for our [previous documentation](https://lob.github.io/legacy-docs/)? * * The version of the OpenAPI document: 1.3.0 * Contact: [email protected] * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package com.lob.api.client; import com.lob.api.ApiCallback; import com.lob.api.ApiClient; import com.lob.api.ApiException; import com.lob.api.ApiResponse; import com.lob.api.Configuration; import com.lob.api.Pair; import com.lob.api.ProgressRequestBody; import com.lob.api.ProgressResponseBody; import com.google.gson.reflect.TypeToken; import java.io.File; import java.io.IOException; import java.nio.file.Files; import com.lob.model.BuckslipOrder; import com.lob.model.BuckslipOrderEditable; import com.lob.model.BuckslipOrdersList; import com.lob.model.LobError; import java.lang.reflect.Type; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; public class BuckslipOrdersApi { private ApiClient localVarApiClient; public BuckslipOrdersApi() { this(Configuration.getDefaultApiClient()); } public BuckslipOrdersApi(ApiClient apiClient) { this.localVarApiClient = apiClient; } public ApiClient getApiClient() { return localVarApiClient; } public void setApiClient(ApiClient apiClient) { this.localVarApiClient = apiClient; } /** * Build call for create * @param buckslipId The ID of the buckslip to which the buckslip orders belong. (required) * @param buckslipOrderEditable (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details

Status Code Description Response Headers
200 Buckslip order created successfully -
0 Lob uses RESTful HTTP response codes to indicate success or failure of an API request. -
*/ public okhttp3.Call createCall(String buckslipId, BuckslipOrderEditable buckslipOrderEditable, final ApiCallback _callback) throws ApiException { Object localVarPostBody = buckslipOrderEditable; // create path and map variables String localVarPath = "/buckslips/{buckslip_id}/orders" .replaceAll("\\{" + "buckslip_id" + "\\}", localVarApiClient.escapeString(buckslipId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json", "application/x-www-form-urlencoded", "multipart/form-data" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "basicAuth" }; return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call createValidateBeforeCall(String buckslipId, BuckslipOrderEditable buckslipOrderEditable, final ApiCallback _callback) throws ApiException { // verify the required parameter 'buckslipId' is set if (buckslipId == null) { throw new ApiException("Missing the required parameter 'buckslipId' when calling create(Async)"); } // verify the required parameter 'buckslipOrderEditable' is set if (buckslipOrderEditable == null) { throw new ApiException("Missing the required parameter 'buckslipOrderEditable' when calling create(Async)"); } okhttp3.Call localVarCall = createCall(buckslipId, buckslipOrderEditable, _callback); return localVarCall; } /** * create * Creates a new buckslip order given information * @param buckslipId The ID of the buckslip to which the buckslip orders belong. (required) * @param buckslipOrderEditable (required) * @return BuckslipOrder * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Buckslip order created successfully -
0 Lob uses RESTful HTTP response codes to indicate success or failure of an API request. -
*/ public BuckslipOrder create(String buckslipId, BuckslipOrderEditable buckslipOrderEditable) throws ApiException { try { ApiResponse localVarResp = createWithHttpInfo(buckslipId, buckslipOrderEditable); return localVarResp.getData(); } catch (ApiException e) { throw e; } } /** * create * Creates a new buckslip order given information * @param buckslipId The ID of the buckslip to which the buckslip orders belong. (required) * @param buckslipOrderEditable (required) * @return ApiResponse<BuckslipOrder> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Buckslip order created successfully -
0 Lob uses RESTful HTTP response codes to indicate success or failure of an API request. -
*/ public ApiResponse createWithHttpInfo(String buckslipId, BuckslipOrderEditable buckslipOrderEditable) throws ApiException { try { okhttp3.Call localVarCall = createValidateBeforeCall(buckslipId, buckslipOrderEditable, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } catch (ApiException e) { throw e; } } /** * create (asynchronously) * Creates a new buckslip order given information * @param buckslipId The ID of the buckslip to which the buckslip orders belong. (required) * @param buckslipOrderEditable (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 Buckslip order created successfully -
0 Lob uses RESTful HTTP response codes to indicate success or failure of an API request. -
*/ public okhttp3.Call createAsync(String buckslipId, BuckslipOrderEditable buckslipOrderEditable, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createValidateBeforeCall(buckslipId, buckslipOrderEditable, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for get * @param buckslipId The ID of the buckslip to which the buckslip orders belong. (required) * @param limit How many results to return. (optional, default to 10) * @param offset An integer that designates the offset at which to begin returning results. Defaults to 0. (optional, default to 0) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 Returns the buckslip orders associated with the given buckslip id -
0 Lob uses RESTful HTTP response codes to indicate success or failure of an API request. -
*/ public okhttp3.Call getCall(String buckslipId, Integer limit, Integer offset, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/buckslips/{buckslip_id}/orders" .replaceAll("\\{" + "buckslip_id" + "\\}", localVarApiClient.escapeString(buckslipId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (limit != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); } if (offset != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); } 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); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "basicAuth" }; return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getValidateBeforeCall(String buckslipId, Integer limit, Integer offset, final ApiCallback _callback) throws ApiException { // verify the required parameter 'buckslipId' is set if (buckslipId == null) { throw new ApiException("Missing the required parameter 'buckslipId' when calling get(Async)"); } okhttp3.Call localVarCall = getCall(buckslipId, limit, offset, _callback); return localVarCall; } /** * get * Retrieves the buckslip orders associated with the given buckslip id. * @param buckslipId The ID of the buckslip to which the buckslip orders belong. (required) * @param limit How many results to return. (optional, default to 10) * @param offset An integer that designates the offset at which to begin returning results. Defaults to 0. (optional, default to 0) * @return BuckslipOrdersList * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Returns the buckslip orders associated with the given buckslip id -
0 Lob uses RESTful HTTP response codes to indicate success or failure of an API request. -
*/ public BuckslipOrdersList get(String buckslipId, Integer limit, Integer offset) throws ApiException { try { ApiResponse localVarResp = getWithHttpInfo(buckslipId, limit, offset); return localVarResp.getData(); } catch (ApiException e) { throw e; } } /** * get * Retrieves the buckslip orders associated with the given buckslip id. * @param buckslipId The ID of the buckslip to which the buckslip orders belong. (required) * @param limit How many results to return. (optional, default to 10) * @param offset An integer that designates the offset at which to begin returning results. Defaults to 0. (optional, default to 0) * @return ApiResponse<BuckslipOrdersList> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Returns the buckslip orders associated with the given buckslip id -
0 Lob uses RESTful HTTP response codes to indicate success or failure of an API request. -
*/ public ApiResponse getWithHttpInfo(String buckslipId, Integer limit, Integer offset) throws ApiException { try { okhttp3.Call localVarCall = getValidateBeforeCall(buckslipId, limit, offset, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } catch (ApiException e) { throw e; } } /** * get (asynchronously) * Retrieves the buckslip orders associated with the given buckslip id. * @param buckslipId The ID of the buckslip to which the buckslip orders belong. (required) * @param limit How many results to return. (optional, default to 10) * @param offset An integer that designates the offset at which to begin returning results. Defaults to 0. (optional, default to 0) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 Returns the buckslip orders associated with the given buckslip id -
0 Lob uses RESTful HTTP response codes to indicate success or failure of an API request. -
*/ public okhttp3.Call getAsync(String buckslipId, Integer limit, Integer offset, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getValidateBeforeCall(buckslipId, limit, offset, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy