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

com.lob.api.client.CampaignsApi 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.Campaign; import com.lob.model.CampaignDeletion; import com.lob.model.CampaignUpdatable; import com.lob.model.CampaignWritable; import com.lob.model.CampaignsList; 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 CampaignsApi { private ApiClient localVarApiClient; public CampaignsApi() { this(Configuration.getDefaultApiClient()); } public CampaignsApi(ApiClient apiClient) { this.localVarApiClient = apiClient; } public ApiClient getApiClient() { return localVarApiClient; } public void setApiClient(ApiClient apiClient) { this.localVarApiClient = apiClient; } /** * Build call for create * @param campaignWritable (required) * @param xLangOutput * `native` - Translate response to the native language of the country in the request * `match` - match the response to the language in the request Default response is in English. (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 Campaign created successfully -
0 Lob uses RESTful HTTP response codes to indicate success or failure of an API request. -
*/ public okhttp3.Call createCall(CampaignWritable campaignWritable, String xLangOutput, final ApiCallback _callback) throws ApiException { Object localVarPostBody = campaignWritable; // create path and map variables String localVarPath = "/campaigns"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (xLangOutput != null) { localVarHeaderParams.put("x-lang-output", localVarApiClient.parameterToString(xLangOutput)); } 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(CampaignWritable campaignWritable, String xLangOutput, final ApiCallback _callback) throws ApiException { // verify the required parameter 'campaignWritable' is set if (campaignWritable == null) { throw new ApiException("Missing the required parameter 'campaignWritable' when calling create(Async)"); } okhttp3.Call localVarCall = createCall(campaignWritable, xLangOutput, _callback); return localVarCall; } /** * create * Creates a new campaign with the provided properties. See how to launch your first campaign [here](https://help.lob.com/best-practices/launching-your-first-campaign). * @param campaignWritable (required) * @param xLangOutput * `native` - Translate response to the native language of the country in the request * `match` - match the response to the language in the request Default response is in English. (optional) * @return Campaign * @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 Campaign created successfully -
0 Lob uses RESTful HTTP response codes to indicate success or failure of an API request. -
*/ public Campaign create(CampaignWritable campaignWritable, String xLangOutput) throws ApiException { try { ApiResponse localVarResp = createWithHttpInfo(campaignWritable, xLangOutput); return localVarResp.getData(); } catch (ApiException e) { throw e; } } /** * create * Creates a new campaign with the provided properties. See how to launch your first campaign [here](https://help.lob.com/best-practices/launching-your-first-campaign). * @param campaignWritable (required) * @param xLangOutput * `native` - Translate response to the native language of the country in the request * `match` - match the response to the language in the request Default response is in English. (optional) * @return ApiResponse<Campaign> * @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 Campaign created successfully -
0 Lob uses RESTful HTTP response codes to indicate success or failure of an API request. -
*/ public ApiResponse createWithHttpInfo(CampaignWritable campaignWritable, String xLangOutput) throws ApiException { try { okhttp3.Call localVarCall = createValidateBeforeCall(campaignWritable, xLangOutput, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } catch (ApiException e) { throw e; } } /** * create (asynchronously) * Creates a new campaign with the provided properties. See how to launch your first campaign [here](https://help.lob.com/best-practices/launching-your-first-campaign). * @param campaignWritable (required) * @param xLangOutput * `native` - Translate response to the native language of the country in the request * `match` - match the response to the language in the request Default response is in English. (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 Campaign created successfully -
0 Lob uses RESTful HTTP response codes to indicate success or failure of an API request. -
*/ public okhttp3.Call createAsync(CampaignWritable campaignWritable, String xLangOutput, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createValidateBeforeCall(campaignWritable, xLangOutput, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for delete * @param cmpId id of the campaign (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 the campaign. -
0 Lob uses RESTful HTTP response codes to indicate success or failure of an API request. -
*/ public okhttp3.Call deleteCall(String cmpId, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/campaigns/{cmp_id}" .replaceAll("\\{" + "cmp_id" + "\\}", localVarApiClient.escapeString(cmpId.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 cmpId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'cmpId' is set if (cmpId == null) { throw new ApiException("Missing the required parameter 'cmpId' when calling delete(Async)"); } okhttp3.Call localVarCall = deleteCall(cmpId, _callback); return localVarCall; } /** * delete * Delete an existing campaign. You need only supply the unique identifier that was returned upon campaign creation. Deleting a campaign also deletes any associated mail pieces that have been created but not sent. A campaign's `send_date` matches its associated mail pieces' `send_date`s. * @param cmpId id of the campaign (required) * @return CampaignDeletion * @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 the campaign. -
0 Lob uses RESTful HTTP response codes to indicate success or failure of an API request. -
*/ public CampaignDeletion delete(String cmpId) throws ApiException { try { ApiResponse localVarResp = deleteWithHttpInfo(cmpId); return localVarResp.getData(); } catch (ApiException e) { throw e; } } /** * delete * Delete an existing campaign. You need only supply the unique identifier that was returned upon campaign creation. Deleting a campaign also deletes any associated mail pieces that have been created but not sent. A campaign's `send_date` matches its associated mail pieces' `send_date`s. * @param cmpId id of the campaign (required) * @return ApiResponse<CampaignDeletion> * @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 the campaign. -
0 Lob uses RESTful HTTP response codes to indicate success or failure of an API request. -
*/ public ApiResponse deleteWithHttpInfo(String cmpId) throws ApiException { try { okhttp3.Call localVarCall = deleteValidateBeforeCall(cmpId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } catch (ApiException e) { throw e; } } /** * delete (asynchronously) * Delete an existing campaign. You need only supply the unique identifier that was returned upon campaign creation. Deleting a campaign also deletes any associated mail pieces that have been created but not sent. A campaign's `send_date` matches its associated mail pieces' `send_date`s. * @param cmpId id of the campaign (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 the campaign. -
0 Lob uses RESTful HTTP response codes to indicate success or failure of an API request. -
*/ public okhttp3.Call deleteAsync(String cmpId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteValidateBeforeCall(cmpId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for get * @param cmpId id of the campaign (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 campaign object -
0 Lob uses RESTful HTTP response codes to indicate success or failure of an API request. -
*/ public okhttp3.Call getCall(String cmpId, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/campaigns/{cmp_id}" .replaceAll("\\{" + "cmp_id" + "\\}", localVarApiClient.escapeString(cmpId.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 cmpId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'cmpId' is set if (cmpId == null) { throw new ApiException("Missing the required parameter 'cmpId' when calling get(Async)"); } okhttp3.Call localVarCall = getCall(cmpId, _callback); return localVarCall; } /** * get * Retrieves the details of an existing campaign. You need only supply the unique campaign identifier that was returned upon campaign creation. * @param cmpId id of the campaign (required) * @return Campaign * @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 campaign object -
0 Lob uses RESTful HTTP response codes to indicate success or failure of an API request. -
*/ public Campaign get(String cmpId) throws ApiException { try { ApiResponse localVarResp = getWithHttpInfo(cmpId); return localVarResp.getData(); } catch (ApiException e) { throw e; } } /** * get * Retrieves the details of an existing campaign. You need only supply the unique campaign identifier that was returned upon campaign creation. * @param cmpId id of the campaign (required) * @return ApiResponse<Campaign> * @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 campaign object -
0 Lob uses RESTful HTTP response codes to indicate success or failure of an API request. -
*/ public ApiResponse getWithHttpInfo(String cmpId) throws ApiException { try { okhttp3.Call localVarCall = getValidateBeforeCall(cmpId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } catch (ApiException e) { throw e; } } /** * get (asynchronously) * Retrieves the details of an existing campaign. You need only supply the unique campaign identifier that was returned upon campaign creation. * @param cmpId id of the campaign (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 campaign object -
0 Lob uses RESTful HTTP response codes to indicate success or failure of an API request. -
*/ public okhttp3.Call getAsync(String cmpId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getValidateBeforeCall(cmpId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for update * @param cmpId id of the campaign (required) * @param campaignUpdatable (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 campaign object -
0 Lob uses RESTful HTTP response codes to indicate success or failure of an API request. -
*/ public okhttp3.Call updateCall(String cmpId, CampaignUpdatable campaignUpdatable, final ApiCallback _callback) throws ApiException { Object localVarPostBody = campaignUpdatable; // create path and map variables String localVarPath = "/campaigns/{cmp_id}" .replaceAll("\\{" + "cmp_id" + "\\}", localVarApiClient.escapeString(cmpId.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, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call updateValidateBeforeCall(String cmpId, CampaignUpdatable campaignUpdatable, final ApiCallback _callback) throws ApiException { // verify the required parameter 'cmpId' is set if (cmpId == null) { throw new ApiException("Missing the required parameter 'cmpId' when calling update(Async)"); } // verify the required parameter 'campaignUpdatable' is set if (campaignUpdatable == null) { throw new ApiException("Missing the required parameter 'campaignUpdatable' when calling update(Async)"); } okhttp3.Call localVarCall = updateCall(cmpId, campaignUpdatable, _callback); return localVarCall; } /** * update * Update the details of an existing campaign. You need only supply the unique identifier that was returned upon campaign creation. * @param cmpId id of the campaign (required) * @param campaignUpdatable (required) * @return Campaign * @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 campaign object -
0 Lob uses RESTful HTTP response codes to indicate success or failure of an API request. -
*/ public Campaign update(String cmpId, CampaignUpdatable campaignUpdatable) throws ApiException { try { ApiResponse localVarResp = updateWithHttpInfo(cmpId, campaignUpdatable); return localVarResp.getData(); } catch (ApiException e) { throw e; } } /** * update * Update the details of an existing campaign. You need only supply the unique identifier that was returned upon campaign creation. * @param cmpId id of the campaign (required) * @param campaignUpdatable (required) * @return ApiResponse<Campaign> * @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 campaign object -
0 Lob uses RESTful HTTP response codes to indicate success or failure of an API request. -
*/ public ApiResponse updateWithHttpInfo(String cmpId, CampaignUpdatable campaignUpdatable) throws ApiException { try { okhttp3.Call localVarCall = updateValidateBeforeCall(cmpId, campaignUpdatable, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } catch (ApiException e) { throw e; } } /** * update (asynchronously) * Update the details of an existing campaign. You need only supply the unique identifier that was returned upon campaign creation. * @param cmpId id of the campaign (required) * @param campaignUpdatable (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 campaign object -
0 Lob uses RESTful HTTP response codes to indicate success or failure of an API request. -
*/ public okhttp3.Call updateAsync(String cmpId, CampaignUpdatable campaignUpdatable, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateValidateBeforeCall(cmpId, campaignUpdatable, _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 include Request that the response include the total count by specifying `include[]=total_count`. (optional) * @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 _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` campaigns. Each entry in the array is a separate letter. The previous and next page of campaigns can be retrieved by calling the endpoint contained in the `previous_url` and `next_url` fields in the API response respectively. If no more campaigns are available beyond the current set of returned results, the `next_url` field will be empty. -
*/ public okhttp3.Call listCall(Integer limit, List include, String before, String after, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/campaigns"; 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 (include != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "include", include)); } if (before != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("before", before)); } if (after != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("after", after)); } 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, List include, String before, String after, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = listCall(limit, include, before, after, _callback); return localVarCall; } /** * list * Returns a list of your campaigns. The campaigns are returned sorted by creation date, with the most recently created campaigns appearing first. * @param limit How many results to return. (optional, default to 10) * @param include Request that the response include the total count by specifying `include[]=total_count`. (optional) * @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) * @return CampaignsList * @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` campaigns. Each entry in the array is a separate letter. The previous and next page of campaigns can be retrieved by calling the endpoint contained in the `previous_url` and `next_url` fields in the API response respectively. If no more campaigns are available beyond the current set of returned results, the `next_url` field will be empty. -
*/ public CampaignsList list(Integer limit, List include, String before, String after) throws ApiException { try { ApiResponse localVarResp = listWithHttpInfo(limit, include, before, after); return localVarResp.getData(); } catch (ApiException e) { throw e; } } /** * list * Returns a list of your campaigns. The campaigns are returned sorted by creation date, with the most recently created campaigns appearing first. * @param limit How many results to return. (optional, default to 10) * @param include Request that the response include the total count by specifying `include[]=total_count`. (optional) * @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) * @return ApiResponse<CampaignsList> * @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` campaigns. Each entry in the array is a separate letter. The previous and next page of campaigns can be retrieved by calling the endpoint contained in the `previous_url` and `next_url` fields in the API response respectively. If no more campaigns are available beyond the current set of returned results, the `next_url` field will be empty. -
*/ public ApiResponse listWithHttpInfo(Integer limit, List include, String before, String after) throws ApiException { try { okhttp3.Call localVarCall = listValidateBeforeCall(limit, include, before, after, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } catch (ApiException e) { throw e; } } /** * list (asynchronously) * Returns a list of your campaigns. The campaigns are returned sorted by creation date, with the most recently created campaigns appearing first. * @param limit How many results to return. (optional, default to 10) * @param include Request that the response include the total count by specifying `include[]=total_count`. (optional) * @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 _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` campaigns. Each entry in the array is a separate letter. The previous and next page of campaigns can be retrieved by calling the endpoint contained in the `previous_url` and `next_url` fields in the API response respectively. If no more campaigns are available beyond the current set of returned results, the `next_url` field will be empty. -
*/ public okhttp3.Call listAsync(Integer limit, List include, String before, String after, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = listValidateBeforeCall(limit, include, before, after, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy