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

com.lob.api.client.TemplateVersionsApi 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.LobError; import java.time.OffsetDateTime; import com.lob.model.TemplateVersion; import com.lob.model.TemplateVersionDeletion; import com.lob.model.TemplateVersionList; import com.lob.model.TemplateVersionUpdatable; import com.lob.model.TemplateVersionWritable; import java.lang.reflect.Type; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; public class TemplateVersionsApi { private ApiClient localVarApiClient; public TemplateVersionsApi() { this(Configuration.getDefaultApiClient()); } public TemplateVersionsApi(ApiClient apiClient) { this.localVarApiClient = apiClient; } public ApiClient getApiClient() { return localVarApiClient; } public void setApiClient(ApiClient apiClient) { this.localVarApiClient = apiClient; } /** * Build call for create * @param tmplId The ID of the template the new version will be attached to (required) * @param templateVersionWritable (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 Returns the template version with the given template and version ids. * ratelimit-limit -
* ratelimit-remaining -
* ratelimit-reset -
0 Lob uses RESTful HTTP response codes to indicate success or failure of an API request. -
*/ public okhttp3.Call createCall(String tmplId, TemplateVersionWritable templateVersionWritable, final ApiCallback _callback) throws ApiException { Object localVarPostBody = templateVersionWritable; // create path and map variables String localVarPath = "/templates/{tmpl_id}/versions" .replaceAll("\\{" + "tmpl_id" + "\\}", localVarApiClient.escapeString(tmplId.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 tmplId, TemplateVersionWritable templateVersionWritable, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tmplId' is set if (tmplId == null) { throw new ApiException("Missing the required parameter 'tmplId' when calling create(Async)"); } // verify the required parameter 'templateVersionWritable' is set if (templateVersionWritable == null) { throw new ApiException("Missing the required parameter 'templateVersionWritable' when calling create(Async)"); } okhttp3.Call localVarCall = createCall(tmplId, templateVersionWritable, _callback); return localVarCall; } /** * create * Creates a new template version attached to the specified template. * @param tmplId The ID of the template the new version will be attached to (required) * @param templateVersionWritable (required) * @return TemplateVersion * @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 template version with the given template and version ids. * ratelimit-limit -
* ratelimit-remaining -
* ratelimit-reset -
0 Lob uses RESTful HTTP response codes to indicate success or failure of an API request. -
*/ public TemplateVersion create(String tmplId, TemplateVersionWritable templateVersionWritable) throws ApiException { try { ApiResponse localVarResp = createWithHttpInfo(tmplId, templateVersionWritable); return localVarResp.getData(); } catch (ApiException e) { throw e; } } /** * create * Creates a new template version attached to the specified template. * @param tmplId The ID of the template the new version will be attached to (required) * @param templateVersionWritable (required) * @return ApiResponse<TemplateVersion> * @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 template version with the given template and version ids. * ratelimit-limit -
* ratelimit-remaining -
* ratelimit-reset -
0 Lob uses RESTful HTTP response codes to indicate success or failure of an API request. -
*/ public ApiResponse createWithHttpInfo(String tmplId, TemplateVersionWritable templateVersionWritable) throws ApiException { try { okhttp3.Call localVarCall = createValidateBeforeCall(tmplId, templateVersionWritable, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } catch (ApiException e) { throw e; } } /** * create (asynchronously) * Creates a new template version attached to the specified template. * @param tmplId The ID of the template the new version will be attached to (required) * @param templateVersionWritable (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 Returns the template version with the given template and version ids. * ratelimit-limit -
* ratelimit-remaining -
* ratelimit-reset -
0 Lob uses RESTful HTTP response codes to indicate success or failure of an API request. -
*/ public okhttp3.Call createAsync(String tmplId, TemplateVersionWritable templateVersionWritable, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createValidateBeforeCall(tmplId, templateVersionWritable, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for delete * @param tmplId The ID of the template to which the version belongs. (required) * @param vrsnId id of the template_version (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 Deleted -
0 Lob uses RESTful HTTP response codes to indicate success or failure of an API request. -
*/ public okhttp3.Call deleteCall(String tmplId, String vrsnId, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/templates/{tmpl_id}/versions/{vrsn_id}" .replaceAll("\\{" + "tmpl_id" + "\\}", localVarApiClient.escapeString(tmplId.toString())) .replaceAll("\\{" + "vrsn_id" + "\\}", localVarApiClient.escapeString(vrsnId.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 = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "basicAuth" }; return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteValidateBeforeCall(String tmplId, String vrsnId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tmplId' is set if (tmplId == null) { throw new ApiException("Missing the required parameter 'tmplId' when calling delete(Async)"); } // verify the required parameter 'vrsnId' is set if (vrsnId == null) { throw new ApiException("Missing the required parameter 'vrsnId' when calling delete(Async)"); } okhttp3.Call localVarCall = deleteCall(tmplId, vrsnId, _callback); return localVarCall; } /** * delete * Permanently deletes a template version. A template's `published_version` can not be deleted. * @param tmplId The ID of the template to which the version belongs. (required) * @param vrsnId id of the template_version (required) * @return TemplateVersionDeletion * @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 Deleted -
0 Lob uses RESTful HTTP response codes to indicate success or failure of an API request. -
*/ public TemplateVersionDeletion delete(String tmplId, String vrsnId) throws ApiException { try { ApiResponse localVarResp = deleteWithHttpInfo(tmplId, vrsnId); return localVarResp.getData(); } catch (ApiException e) { throw e; } } /** * delete * Permanently deletes a template version. A template's `published_version` can not be deleted. * @param tmplId The ID of the template to which the version belongs. (required) * @param vrsnId id of the template_version (required) * @return ApiResponse<TemplateVersionDeletion> * @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 Deleted -
0 Lob uses RESTful HTTP response codes to indicate success or failure of an API request. -
*/ public ApiResponse deleteWithHttpInfo(String tmplId, String vrsnId) throws ApiException { try { okhttp3.Call localVarCall = deleteValidateBeforeCall(tmplId, vrsnId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } catch (ApiException e) { throw e; } } /** * delete (asynchronously) * Permanently deletes a template version. A template's `published_version` can not be deleted. * @param tmplId The ID of the template to which the version belongs. (required) * @param vrsnId id of the template_version (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 Deleted -
0 Lob uses RESTful HTTP response codes to indicate success or failure of an API request. -
*/ public okhttp3.Call deleteAsync(String tmplId, String vrsnId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteValidateBeforeCall(tmplId, vrsnId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for get * @param tmplId The ID of the template to which the version belongs. (required) * @param vrsnId id of the template_version (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 Returns the template version with the given template and version ids. -
0 Lob uses RESTful HTTP response codes to indicate success or failure of an API request. -
*/ public okhttp3.Call getCall(String tmplId, String vrsnId, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/templates/{tmpl_id}/versions/{vrsn_id}" .replaceAll("\\{" + "tmpl_id" + "\\}", localVarApiClient.escapeString(tmplId.toString())) .replaceAll("\\{" + "vrsn_id" + "\\}", localVarApiClient.escapeString(vrsnId.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 = { }; 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 tmplId, String vrsnId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tmplId' is set if (tmplId == null) { throw new ApiException("Missing the required parameter 'tmplId' when calling get(Async)"); } // verify the required parameter 'vrsnId' is set if (vrsnId == null) { throw new ApiException("Missing the required parameter 'vrsnId' when calling get(Async)"); } okhttp3.Call localVarCall = getCall(tmplId, vrsnId, _callback); return localVarCall; } /** * get * Retrieves the template version with the given template and version ids. * @param tmplId The ID of the template to which the version belongs. (required) * @param vrsnId id of the template_version (required) * @return TemplateVersion * @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 template version with the given template and version ids. -
0 Lob uses RESTful HTTP response codes to indicate success or failure of an API request. -
*/ public TemplateVersion get(String tmplId, String vrsnId) throws ApiException { try { ApiResponse localVarResp = getWithHttpInfo(tmplId, vrsnId); return localVarResp.getData(); } catch (ApiException e) { throw e; } } /** * get * Retrieves the template version with the given template and version ids. * @param tmplId The ID of the template to which the version belongs. (required) * @param vrsnId id of the template_version (required) * @return ApiResponse<TemplateVersion> * @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 template version with the given template and version ids. -
0 Lob uses RESTful HTTP response codes to indicate success or failure of an API request. -
*/ public ApiResponse getWithHttpInfo(String tmplId, String vrsnId) throws ApiException { try { okhttp3.Call localVarCall = getValidateBeforeCall(tmplId, vrsnId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } catch (ApiException e) { throw e; } } /** * get (asynchronously) * Retrieves the template version with the given template and version ids. * @param tmplId The ID of the template to which the version belongs. (required) * @param vrsnId id of the template_version (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 Returns the template version with the given template and version ids. -
0 Lob uses RESTful HTTP response codes to indicate success or failure of an API request. -
*/ public okhttp3.Call getAsync(String tmplId, String vrsnId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getValidateBeforeCall(tmplId, vrsnId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for update * @param tmplId The ID of the template to which the version belongs. (required) * @param vrsnId id of the template_version (required) * @param templateVersionUpdatable (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 Returns the template version with the given template and version ids. * ratelimit-limit -
* ratelimit-remaining -
* ratelimit-reset -
0 Lob uses RESTful HTTP response codes to indicate success or failure of an API request. -
*/ public okhttp3.Call updateCall(String tmplId, String vrsnId, TemplateVersionUpdatable templateVersionUpdatable, final ApiCallback _callback) throws ApiException { Object localVarPostBody = templateVersionUpdatable; // create path and map variables String localVarPath = "/templates/{tmpl_id}/versions/{vrsn_id}" .replaceAll("\\{" + "tmpl_id" + "\\}", localVarApiClient.escapeString(tmplId.toString())) .replaceAll("\\{" + "vrsn_id" + "\\}", localVarApiClient.escapeString(vrsnId.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 updateValidateBeforeCall(String tmplId, String vrsnId, TemplateVersionUpdatable templateVersionUpdatable, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tmplId' is set if (tmplId == null) { throw new ApiException("Missing the required parameter 'tmplId' when calling update(Async)"); } // verify the required parameter 'vrsnId' is set if (vrsnId == null) { throw new ApiException("Missing the required parameter 'vrsnId' when calling update(Async)"); } // verify the required parameter 'templateVersionUpdatable' is set if (templateVersionUpdatable == null) { throw new ApiException("Missing the required parameter 'templateVersionUpdatable' when calling update(Async)"); } okhttp3.Call localVarCall = updateCall(tmplId, vrsnId, templateVersionUpdatable, _callback); return localVarCall; } /** * update * Updates the template version with the given template and version ids. * @param tmplId The ID of the template to which the version belongs. (required) * @param vrsnId id of the template_version (required) * @param templateVersionUpdatable (required) * @return TemplateVersion * @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 template version with the given template and version ids. * ratelimit-limit -
* ratelimit-remaining -
* ratelimit-reset -
0 Lob uses RESTful HTTP response codes to indicate success or failure of an API request. -
*/ public TemplateVersion update(String tmplId, String vrsnId, TemplateVersionUpdatable templateVersionUpdatable) throws ApiException { try { ApiResponse localVarResp = updateWithHttpInfo(tmplId, vrsnId, templateVersionUpdatable); return localVarResp.getData(); } catch (ApiException e) { throw e; } } /** * update * Updates the template version with the given template and version ids. * @param tmplId The ID of the template to which the version belongs. (required) * @param vrsnId id of the template_version (required) * @param templateVersionUpdatable (required) * @return ApiResponse<TemplateVersion> * @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 template version with the given template and version ids. * ratelimit-limit -
* ratelimit-remaining -
* ratelimit-reset -
0 Lob uses RESTful HTTP response codes to indicate success or failure of an API request. -
*/ public ApiResponse updateWithHttpInfo(String tmplId, String vrsnId, TemplateVersionUpdatable templateVersionUpdatable) throws ApiException { try { okhttp3.Call localVarCall = updateValidateBeforeCall(tmplId, vrsnId, templateVersionUpdatable, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } catch (ApiException e) { throw e; } } /** * update (asynchronously) * Updates the template version with the given template and version ids. * @param tmplId The ID of the template to which the version belongs. (required) * @param vrsnId id of the template_version (required) * @param templateVersionUpdatable (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 Returns the template version with the given template and version ids. * ratelimit-limit -
* ratelimit-remaining -
* ratelimit-reset -
0 Lob uses RESTful HTTP response codes to indicate success or failure of an API request. -
*/ public okhttp3.Call updateAsync(String tmplId, String vrsnId, TemplateVersionUpdatable templateVersionUpdatable, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateValidateBeforeCall(tmplId, vrsnId, templateVersionUpdatable, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for list * @param tmplId The ID of the template associated with the retrieved versions (required) * @param limit How many results to return. (optional, default to 10) * @param before A reference to a list entry used for paginating to the previous set of entries. This field is pre-populated in the `previous_url` field in the return response. (optional) * @param after A reference to a list entry used for paginating to the next set of entries. This field is pre-populated in the `next_url` field in the return response. (optional) * @param include Request that the response include the total count by specifying `include[]=total_count`. (optional) * @param dateCreated Filter by date created. (optional) * @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 A dictionary with a data property that contains an array of up to `limit` template versions. Each entry in the array is a separate template version object. The previous and next page of template versions can be retrieved by calling the endpoint contained in the `previous_url` and `next_url` fields in the API response respectively.<br>If no more template versions are available beyond the current set of returned results, the `next_url` field will be empty. -
0 Lob uses RESTful HTTP response codes to indicate success or failure of an API request. -
*/ public okhttp3.Call listCall(String tmplId, Integer limit, String before, String after, List include, Map dateCreated, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/templates/{tmpl_id}/versions" .replaceAll("\\{" + "tmpl_id" + "\\}", localVarApiClient.escapeString(tmplId.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 (before != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("before", before)); } if (after != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("after", after)); } if (include != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "include", include)); } if (dateCreated != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("date_created", dateCreated)); } 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 listValidateBeforeCall(String tmplId, Integer limit, String before, String after, List include, Map dateCreated, final ApiCallback _callback) throws ApiException { // verify the required parameter 'tmplId' is set if (tmplId == null) { throw new ApiException("Missing the required parameter 'tmplId' when calling list(Async)"); } okhttp3.Call localVarCall = listCall(tmplId, limit, before, after, include, dateCreated, _callback); return localVarCall; } /** * list * Returns a list of template versions for the given template ID. The template versions are sorted by creation date, with the most recently created appearing first. * @param tmplId The ID of the template associated with the retrieved versions (required) * @param limit How many results to return. (optional, default to 10) * @param before A reference to a list entry used for paginating to the previous set of entries. This field is pre-populated in the `previous_url` field in the return response. (optional) * @param after A reference to a list entry used for paginating to the next set of entries. This field is pre-populated in the `next_url` field in the return response. (optional) * @param include Request that the response include the total count by specifying `include[]=total_count`. (optional) * @param dateCreated Filter by date created. (optional) * @return TemplateVersionList * @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 A dictionary with a data property that contains an array of up to `limit` template versions. Each entry in the array is a separate template version object. The previous and next page of template versions can be retrieved by calling the endpoint contained in the `previous_url` and `next_url` fields in the API response respectively.<br>If no more template versions are available beyond the current set of returned results, the `next_url` field will be empty. -
0 Lob uses RESTful HTTP response codes to indicate success or failure of an API request. -
*/ public TemplateVersionList list(String tmplId, Integer limit, String before, String after, List include, Map dateCreated) throws ApiException { try { ApiResponse localVarResp = listWithHttpInfo(tmplId, limit, before, after, include, dateCreated); return localVarResp.getData(); } catch (ApiException e) { throw e; } } /** * list * Returns a list of template versions for the given template ID. The template versions are sorted by creation date, with the most recently created appearing first. * @param tmplId The ID of the template associated with the retrieved versions (required) * @param limit How many results to return. (optional, default to 10) * @param before A reference to a list entry used for paginating to the previous set of entries. This field is pre-populated in the `previous_url` field in the return response. (optional) * @param after A reference to a list entry used for paginating to the next set of entries. This field is pre-populated in the `next_url` field in the return response. (optional) * @param include Request that the response include the total count by specifying `include[]=total_count`. (optional) * @param dateCreated Filter by date created. (optional) * @return ApiResponse<TemplateVersionList> * @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 A dictionary with a data property that contains an array of up to `limit` template versions. Each entry in the array is a separate template version object. The previous and next page of template versions can be retrieved by calling the endpoint contained in the `previous_url` and `next_url` fields in the API response respectively.<br>If no more template versions are available beyond the current set of returned results, the `next_url` field will be empty. -
0 Lob uses RESTful HTTP response codes to indicate success or failure of an API request. -
*/ public ApiResponse listWithHttpInfo(String tmplId, Integer limit, String before, String after, List include, Map dateCreated) throws ApiException { try { okhttp3.Call localVarCall = listValidateBeforeCall(tmplId, limit, before, after, include, dateCreated, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } catch (ApiException e) { throw e; } } /** * list (asynchronously) * Returns a list of template versions for the given template ID. The template versions are sorted by creation date, with the most recently created appearing first. * @param tmplId The ID of the template associated with the retrieved versions (required) * @param limit How many results to return. (optional, default to 10) * @param before A reference to a list entry used for paginating to the previous set of entries. This field is pre-populated in the `previous_url` field in the return response. (optional) * @param after A reference to a list entry used for paginating to the next set of entries. This field is pre-populated in the `next_url` field in the return response. (optional) * @param include Request that the response include the total count by specifying `include[]=total_count`. (optional) * @param dateCreated Filter by date created. (optional) * @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 A dictionary with a data property that contains an array of up to `limit` template versions. Each entry in the array is a separate template version object. The previous and next page of template versions can be retrieved by calling the endpoint contained in the `previous_url` and `next_url` fields in the API response respectively.<br>If no more template versions are available beyond the current set of returned results, the `next_url` field will be empty. -
0 Lob uses RESTful HTTP response codes to indicate success or failure of an API request. -
*/ public okhttp3.Call listAsync(String tmplId, Integer limit, String before, String after, List include, Map dateCreated, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = listValidateBeforeCall(tmplId, limit, before, after, include, dateCreated, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy