Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* 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.Letter;
import com.lob.model.LetterDeletion;
import com.lob.model.LetterEditable;
import com.lob.model.LetterList;
import com.lob.model.LobError;
import com.lob.model.MailType;
import java.time.OffsetDateTime;
import com.lob.model.SortBy3;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class LettersApi {
private ApiClient localVarApiClient;
public LettersApi() {
this(Configuration.getDefaultApiClient());
}
public LettersApi(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
public ApiClient getApiClient() {
return localVarApiClient;
}
public void setApiClient(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
/**
* Build call for cancel
* @param ltrId id of the letter (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 cancelCall(String ltrId, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/letters/{ltr_id}"
.replaceAll("\\{" + "ltr_id" + "\\}", localVarApiClient.escapeString(ltrId.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 cancelValidateBeforeCall(String ltrId, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'ltrId' is set
if (ltrId == null) {
throw new ApiException("Missing the required parameter 'ltrId' when calling cancel(Async)");
}
okhttp3.Call localVarCall = cancelCall(ltrId, _callback);
return localVarCall;
}
/**
* cancel
* Completely removes a letter from production. This can only be done if the letter has a `send_date` and the `send_date` has not yet passed. If the letter is successfully canceled, you will not be charged for it. Read more on [cancellation windows](#section/Cancellation-Windows) and [scheduling](#section/Scheduled-Mailings). Scheduling and cancellation is a premium feature. Upgrade to the appropriate [Print & Mail Edition](https://dashboard.lob.com/#/settings/editions) to gain access.
* @param ltrId id of the letter (required)
* @return LetterDeletion
* @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 LetterDeletion cancel(String ltrId) throws ApiException {
try {
ApiResponse localVarResp = cancelWithHttpInfo(ltrId);
return localVarResp.getData();
} catch (ApiException e) {
throw e;
}
}
/**
* cancel
* Completely removes a letter from production. This can only be done if the letter has a `send_date` and the `send_date` has not yet passed. If the letter is successfully canceled, you will not be charged for it. Read more on [cancellation windows](#section/Cancellation-Windows) and [scheduling](#section/Scheduled-Mailings). Scheduling and cancellation is a premium feature. Upgrade to the appropriate [Print & Mail Edition](https://dashboard.lob.com/#/settings/editions) to gain access.
* @param ltrId id of the letter (required)
* @return ApiResponse<LetterDeletion>
* @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 cancelWithHttpInfo(String ltrId) throws ApiException {
try {
okhttp3.Call localVarCall = cancelValidateBeforeCall(ltrId, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
} catch (ApiException e) {
throw e;
}
}
/**
* cancel (asynchronously)
* Completely removes a letter from production. This can only be done if the letter has a `send_date` and the `send_date` has not yet passed. If the letter is successfully canceled, you will not be charged for it. Read more on [cancellation windows](#section/Cancellation-Windows) and [scheduling](#section/Scheduled-Mailings). Scheduling and cancellation is a premium feature. Upgrade to the appropriate [Print & Mail Edition](https://dashboard.lob.com/#/settings/editions) to gain access.
* @param ltrId id of the letter (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 cancelAsync(String ltrId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = cancelValidateBeforeCall(ltrId, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for create
* @param letterEditable (required)
* @param idempotencyKey A string of no longer than 256 characters that uniquely identifies this resource. For more help integrating idempotency keys, refer to our [implementation guide](https://www.lob.com/guides#idempotent_request). (optional)
* @param file An optional file upload as either a byte array or file type. (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
Lob uses RESTful HTTP response codes to indicate success or failure of an API request.
-
*/
public Letter create(LetterEditable letterEditable, String idempotencyKey) throws ApiException {
try {
ApiResponse localVarResp = createWithHttpInfo(letterEditable, idempotencyKey, null);
return localVarResp.getData();
} catch (ApiException e) {
throw e;
}
}
/**
* create
* Creates a new letter given information
* @param letterEditable (required)
* @param idempotencyKey A string of no longer than 256 characters that uniquely identifies this resource. For more help integrating idempotency keys, refer to our [implementation guide](https://www.lob.com/guides#idempotent_request). (optional)
* @param file An optional file upload as either a byte array or file type. (optional)
* @return Letter
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Lob uses RESTful HTTP response codes to indicate success or failure of an API request.
-
*/
public Letter create(LetterEditable letterEditable, String idempotencyKey, Object file) throws ApiException {
try {
ApiResponse localVarResp = createWithHttpInfo(letterEditable, idempotencyKey, file);
return localVarResp.getData();
} catch (ApiException e) {
throw e;
}
}
/**
* create
* Creates a new letter given information
* @param letterEditable (required)
* @param idempotencyKey A string of no longer than 256 characters that uniquely identifies this resource. For more help integrating idempotency keys, refer to our [implementation guide](https://www.lob.com/guides#idempotent_request). (optional)
* @param file An optional file upload as either a byte array or file type. (optional)
* @return ApiResponse<Letter>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Lob uses RESTful HTTP response codes to indicate success or failure of an API request.
-
*/
public ApiResponse createWithHttpInfo(LetterEditable letterEditable, String idempotencyKey, Object file) throws ApiException {
try {
okhttp3.Call localVarCall = createValidateBeforeCall(letterEditable, idempotencyKey, file, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
} catch (ApiException e) {
throw e;
}
}
/**
* create (asynchronously)
* Creates a new letter given information
* @param letterEditable (required)
* @param idempotencyKey A string of no longer than 256 characters that uniquely identifies this resource. For more help integrating idempotency keys, refer to our [implementation guide](https://www.lob.com/guides#idempotent_request). (optional)
* @param file An optional file upload as either a byte array or file type. (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
Lob uses RESTful HTTP response codes to indicate success or failure of an API request.
-
*/
public okhttp3.Call createAsync(LetterEditable letterEditable, String idempotencyKey, Object file, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = createValidateBeforeCall(letterEditable, idempotencyKey, file, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for get
* @param ltrId id of the letter (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 a letter object
-
0
Lob uses RESTful HTTP response codes to indicate success or failure of an API request.
-
*/
public okhttp3.Call getCall(String ltrId, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/letters/{ltr_id}"
.replaceAll("\\{" + "ltr_id" + "\\}", localVarApiClient.escapeString(ltrId.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 ltrId, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'ltrId' is set
if (ltrId == null) {
throw new ApiException("Missing the required parameter 'ltrId' when calling get(Async)");
}
okhttp3.Call localVarCall = getCall(ltrId, _callback);
return localVarCall;
}
/**
* get
* Retrieves the details of an existing letter. You need only supply the unique letter identifier that was returned upon letter creation.
* @param ltrId id of the letter (required)
* @return Letter
* @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 a letter object
-
0
Lob uses RESTful HTTP response codes to indicate success or failure of an API request.
-
*/
public Letter get(String ltrId) throws ApiException {
try {
ApiResponse localVarResp = getWithHttpInfo(ltrId);
return localVarResp.getData();
} catch (ApiException e) {
throw e;
}
}
/**
* get
* Retrieves the details of an existing letter. You need only supply the unique letter identifier that was returned upon letter creation.
* @param ltrId id of the letter (required)
* @return ApiResponse<Letter>
* @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 a letter object
-
0
Lob uses RESTful HTTP response codes to indicate success or failure of an API request.
-
*/
public ApiResponse getWithHttpInfo(String ltrId) throws ApiException {
try {
okhttp3.Call localVarCall = getValidateBeforeCall(ltrId, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
} catch (ApiException e) {
throw e;
}
}
/**
* get (asynchronously)
* Retrieves the details of an existing letter. You need only supply the unique letter identifier that was returned upon letter creation.
* @param ltrId id of the letter (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 a letter object
-
0
Lob uses RESTful HTTP response codes to indicate success or failure of an API request.
-
*/
public okhttp3.Call getAsync(String ltrId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getValidateBeforeCall(ltrId, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for list
* @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 metadata Filter by metadata key-value pair`. (optional)
* @param color Set to `true` to return only color letters. Set to `false` to return only black & white letters. (optional)
* @param scheduled * `true` - only return orders (past or future) where `send_date` is greater than `date_created` * `false` - only return orders where `send_date` is equal to `date_created` (optional)
* @param sendDate Filter by date sent. (optional)
* @param mailType A string designating the mail postage type: * `usps_first_class` - (default) * `usps_standard` - a [cheaper option](https://lob.com/pricing/print-mail#compare) which is less predictable and takes longer to deliver. `usps_standard` cannot be used with `4x6` postcards or for any postcards sent outside of the United States. (optional)
* @param sortBy Sorts items by ascending or descending dates. Use either `date_created` or `send_date`, not both. (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` letters. Each entry in the array is a separate letter. The previous and next page of letters can be retrieved by calling the endpoint contained in the `previous_url` and `next_url` fields in the API response respectively. If no more letters 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(Integer limit, String before, String after, List include, Map dateCreated, Map metadata, Boolean color, Boolean scheduled, Map sendDate, MailType mailType, SortBy3 sortBy, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/letters";
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));
}
if (metadata != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("metadata", metadata));
}
if (color != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("color", color));
}
if (scheduled != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("scheduled", scheduled));
}
if (sendDate != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("send_date", sendDate));
}
if (mailType != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("mail_type", mailType));
}
if (sortBy != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("sort_by", sortBy));
}
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(Integer limit, String before, String after, List include, Map dateCreated, Map metadata, Boolean color, Boolean scheduled, Map sendDate, MailType mailType, SortBy3 sortBy, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = listCall(limit, before, after, include, dateCreated, metadata, color, scheduled, sendDate, mailType, sortBy, _callback);
return localVarCall;
}
/**
* list
* Returns a list of your letters. The letters are returned sorted by creation date, with the most recently created letters appearing first.
* @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 metadata Filter by metadata key-value pair`. (optional)
* @param color Set to `true` to return only color letters. Set to `false` to return only black & white letters. (optional)
* @param scheduled * `true` - only return orders (past or future) where `send_date` is greater than `date_created` * `false` - only return orders where `send_date` is equal to `date_created` (optional)
* @param sendDate Filter by date sent. (optional)
* @param mailType A string designating the mail postage type: * `usps_first_class` - (default) * `usps_standard` - a [cheaper option](https://lob.com/pricing/print-mail#compare) which is less predictable and takes longer to deliver. `usps_standard` cannot be used with `4x6` postcards or for any postcards sent outside of the United States. (optional)
* @param sortBy Sorts items by ascending or descending dates. Use either `date_created` or `send_date`, not both. (optional)
* @return LetterList
* @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` letters. Each entry in the array is a separate letter. The previous and next page of letters can be retrieved by calling the endpoint contained in the `previous_url` and `next_url` fields in the API response respectively. If no more letters 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 LetterList list(Integer limit, String before, String after, List include, Map dateCreated, Map metadata, Boolean color, Boolean scheduled, Map sendDate, MailType mailType, SortBy3 sortBy) throws ApiException {
try {
ApiResponse localVarResp = listWithHttpInfo(limit, before, after, include, dateCreated, metadata, color, scheduled, sendDate, mailType, sortBy);
return localVarResp.getData();
} catch (ApiException e) {
throw e;
}
}
/**
* list
* Returns a list of your letters. The letters are returned sorted by creation date, with the most recently created letters appearing first.
* @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 metadata Filter by metadata key-value pair`. (optional)
* @param color Set to `true` to return only color letters. Set to `false` to return only black & white letters. (optional)
* @param scheduled * `true` - only return orders (past or future) where `send_date` is greater than `date_created` * `false` - only return orders where `send_date` is equal to `date_created` (optional)
* @param sendDate Filter by date sent. (optional)
* @param mailType A string designating the mail postage type: * `usps_first_class` - (default) * `usps_standard` - a [cheaper option](https://lob.com/pricing/print-mail#compare) which is less predictable and takes longer to deliver. `usps_standard` cannot be used with `4x6` postcards or for any postcards sent outside of the United States. (optional)
* @param sortBy Sorts items by ascending or descending dates. Use either `date_created` or `send_date`, not both. (optional)
* @return ApiResponse<LetterList>
* @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` letters. Each entry in the array is a separate letter. The previous and next page of letters can be retrieved by calling the endpoint contained in the `previous_url` and `next_url` fields in the API response respectively. If no more letters 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(Integer limit, String before, String after, List include, Map dateCreated, Map metadata, Boolean color, Boolean scheduled, Map sendDate, MailType mailType, SortBy3 sortBy) throws ApiException {
try {
okhttp3.Call localVarCall = listValidateBeforeCall(limit, before, after, include, dateCreated, metadata, color, scheduled, sendDate, mailType, sortBy, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
} catch (ApiException e) {
throw e;
}
}
/**
* list (asynchronously)
* Returns a list of your letters. The letters are returned sorted by creation date, with the most recently created letters appearing first.
* @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 metadata Filter by metadata key-value pair`. (optional)
* @param color Set to `true` to return only color letters. Set to `false` to return only black & white letters. (optional)
* @param scheduled * `true` - only return orders (past or future) where `send_date` is greater than `date_created` * `false` - only return orders where `send_date` is equal to `date_created` (optional)
* @param sendDate Filter by date sent. (optional)
* @param mailType A string designating the mail postage type: * `usps_first_class` - (default) * `usps_standard` - a [cheaper option](https://lob.com/pricing/print-mail#compare) which is less predictable and takes longer to deliver. `usps_standard` cannot be used with `4x6` postcards or for any postcards sent outside of the United States. (optional)
* @param sortBy Sorts items by ascending or descending dates. Use either `date_created` or `send_date`, not both. (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` letters. Each entry in the array is a separate letter. The previous and next page of letters can be retrieved by calling the endpoint contained in the `previous_url` and `next_url` fields in the API response respectively. If no more letters 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.