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.
/*
* Marketing API v.1.0
* IMPORTANT: This swagger links to Criteo production environment. Any test applied here will thus impact real campaigns.
*
* The version of the OpenAPI document: v.1.0
*
*
* 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.criteo.marketing.api;
import com.criteo.marketing.ApiCallback;
import com.criteo.marketing.ApiClient;
import com.criteo.marketing.ApiException;
import com.criteo.marketing.ApiResponse;
import com.criteo.marketing.Configuration;
import com.criteo.marketing.Pair;
import com.criteo.marketing.ProgressRequestBody;
import com.criteo.marketing.ProgressResponseBody;
import com.google.gson.reflect.TypeToken;
import java.io.IOException;
import com.criteo.marketing.model.CreateSellerBudgetMapiMessage;
import com.criteo.marketing.model.ErrorSource;
import java.time.OffsetDateTime;
import com.criteo.marketing.model.SellerBase;
import com.criteo.marketing.model.SellerBudgetMessage;
import com.criteo.marketing.model.SellerCampaignMessage;
import com.criteo.marketing.model.SellerCampaignUpdate;
import com.criteo.marketing.model.UpdateSellerBudgetMessage;
import com.criteo.marketing.model.UpdateSellerBudgetMessageBase;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class SellersV2Api {
private ApiClient localVarApiClient;
public SellersV2Api() {
this(Configuration.getDefaultApiClient());
}
public SellersV2Api(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
public ApiClient getApiClient() {
return localVarApiClient;
}
public void setApiClient(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
/**
* Build call for createSellerBudgets
* @param authorization JWT Bearer Token (required)
* @param createSellerBudgets (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
OK
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public okhttp3.Call createSellerBudgetsCall(String authorization, List createSellerBudgets, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = createSellerBudgets;
// create path and map variables
String localVarPath = "/v2/crp/budgets";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
if (authorization != null) {
localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization));
}
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json", "text/json", "application/xml", "text/xml", "text/html"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json", "text/json", "application/xml", "text/xml", "application/x-www-form-urlencoded", "text/html"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "Authorization" };
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call createSellerBudgetsValidateBeforeCall(String authorization, List createSellerBudgets, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'authorization' is set
if (authorization == null) {
throw new ApiException("Missing the required parameter 'authorization' when calling createSellerBudgets(Async)");
}
// verify the required parameter 'createSellerBudgets' is set
if (createSellerBudgets == null) {
throw new ApiException("Missing the required parameter 'createSellerBudgets' when calling createSellerBudgets(Async)");
}
okhttp3.Call localVarCall = createSellerBudgetsCall(authorization, createSellerBudgets, _callback);
return localVarCall;
}
/**
* Create a collection of budgets.
* Create one or more new budgets to enable spending with the given limitations. All three types of budgets can be created this way. The following constraints apply when creating a new budget. • <b>sellerId</b>: the seller MUST be supplied<br /> • <b>campaignIds</b>: a non-empty array of campaign ids MUST be supplied<br /> • <b>budgetType</b>: a budget type MUST be supplied<br /> • <b>amount</b>: an amount MAY be supplied only if the type is not Uncapped and if supplied it MUST be non-negative<br /> • <b>startDate</b>: a future start date MUST be supplied<br /> • <b>endDate</b>: an end date MAY be supplied and if supplied MUST be greater than the start date<br /> Other attributes MUST NOT be supplied.
* @param authorization JWT Bearer Token (required)
* @param createSellerBudgets (required)
* @return List<SellerBudgetMessage>
* @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
OK
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public List createSellerBudgets(String authorization, List createSellerBudgets) throws ApiException {
ApiResponse> localVarResp = createSellerBudgetsWithHttpInfo(authorization, createSellerBudgets);
return localVarResp.getData();
}
/**
* Create a collection of budgets.
* Create one or more new budgets to enable spending with the given limitations. All three types of budgets can be created this way. The following constraints apply when creating a new budget. • <b>sellerId</b>: the seller MUST be supplied<br /> • <b>campaignIds</b>: a non-empty array of campaign ids MUST be supplied<br /> • <b>budgetType</b>: a budget type MUST be supplied<br /> • <b>amount</b>: an amount MAY be supplied only if the type is not Uncapped and if supplied it MUST be non-negative<br /> • <b>startDate</b>: a future start date MUST be supplied<br /> • <b>endDate</b>: an end date MAY be supplied and if supplied MUST be greater than the start date<br /> Other attributes MUST NOT be supplied.
* @param authorization JWT Bearer Token (required)
* @param createSellerBudgets (required)
* @return ApiResponse<List<SellerBudgetMessage>>
* @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
OK
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public ApiResponse> createSellerBudgetsWithHttpInfo(String authorization, List createSellerBudgets) throws ApiException {
okhttp3.Call localVarCall = createSellerBudgetsValidateBeforeCall(authorization, createSellerBudgets, null);
Type localVarReturnType = new TypeToken>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Create a collection of budgets. (asynchronously)
* Create one or more new budgets to enable spending with the given limitations. All three types of budgets can be created this way. The following constraints apply when creating a new budget. • <b>sellerId</b>: the seller MUST be supplied<br /> • <b>campaignIds</b>: a non-empty array of campaign ids MUST be supplied<br /> • <b>budgetType</b>: a budget type MUST be supplied<br /> • <b>amount</b>: an amount MAY be supplied only if the type is not Uncapped and if supplied it MUST be non-negative<br /> • <b>startDate</b>: a future start date MUST be supplied<br /> • <b>endDate</b>: an end date MAY be supplied and if supplied MUST be greater than the start date<br /> Other attributes MUST NOT be supplied.
* @param authorization JWT Bearer Token (required)
* @param createSellerBudgets (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
OK
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public okhttp3.Call createSellerBudgetsAsync(String authorization, List createSellerBudgets, final ApiCallback> _callback) throws ApiException {
okhttp3.Call localVarCall = createSellerBudgetsValidateBeforeCall(authorization, createSellerBudgets, _callback);
Type localVarReturnType = new TypeToken>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getBudgetsBySeller
* @param sellerId Return only budgets belonging to the given seller. (required)
* @param authorization JWT Bearer Token (required)
* @param status Return only budgets with the given status. (optional)
* @param withBalance Return only budgets with the given status. (optional)
* @param withSpend Return budgets with any positive spend. (optional)
* @param endAfterDate Return budgets that end after the given date using the `yyyy-MM-DD` format. If param is not provided, default behavior is to only return budgets that have not yet ended. (optional)
* @param startBeforeDate Return budgets that start on or before the given date using the `yyyy-MM-DD` format. (optional)
* @param campaignId Return only budgets that pay for a given campaign. (optional)
* @param type Return only budgets with the given budget 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
Status Code
Description
Response Headers
200
OK
-
400
List of errors encountered
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public okhttp3.Call getBudgetsBySellerCall(String sellerId, String authorization, String status, Boolean withBalance, Boolean withSpend, OffsetDateTime endAfterDate, OffsetDateTime startBeforeDate, Integer campaignId, String type, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/v2/crp/sellers/{sellerId}/budgets"
.replaceAll("\\{" + "sellerId" + "\\}", localVarApiClient.escapeString(sellerId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
if (status != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("status", status));
}
if (withBalance != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("withBalance", withBalance));
}
if (withSpend != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("withSpend", withSpend));
}
if (endAfterDate != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("endAfterDate", endAfterDate));
}
if (startBeforeDate != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("startBeforeDate", startBeforeDate));
}
if (campaignId != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("campaignId", campaignId));
}
if (type != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("type", type));
}
Map localVarHeaderParams = new HashMap();
if (authorization != null) {
localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization));
}
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json", "text/json", "application/xml", "text/xml", "text/html"
};
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[] { "Authorization" };
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getBudgetsBySellerValidateBeforeCall(String sellerId, String authorization, String status, Boolean withBalance, Boolean withSpend, OffsetDateTime endAfterDate, OffsetDateTime startBeforeDate, Integer campaignId, String type, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'sellerId' is set
if (sellerId == null) {
throw new ApiException("Missing the required parameter 'sellerId' when calling getBudgetsBySeller(Async)");
}
// verify the required parameter 'authorization' is set
if (authorization == null) {
throw new ApiException("Missing the required parameter 'authorization' when calling getBudgetsBySeller(Async)");
}
okhttp3.Call localVarCall = getBudgetsBySellerCall(sellerId, authorization, status, withBalance, withSpend, endAfterDate, startBeforeDate, campaignId, type, _callback);
return localVarCall;
}
/**
* Get a collection of budgets for this seller.
* Return a collection of budgets for this seller filtered by optional filter parameters. If all parameters are omitted the entire collection to which the user has access is returned, except those whose endDate is in the past. Returned budgets must satisfy all supplied filter criteria if multiple parameters are used. See the budgets endpoint for additional details.
* @param sellerId Return only budgets belonging to the given seller. (required)
* @param authorization JWT Bearer Token (required)
* @param status Return only budgets with the given status. (optional)
* @param withBalance Return only budgets with the given status. (optional)
* @param withSpend Return budgets with any positive spend. (optional)
* @param endAfterDate Return budgets that end after the given date using the `yyyy-MM-DD` format. If param is not provided, default behavior is to only return budgets that have not yet ended. (optional)
* @param startBeforeDate Return budgets that start on or before the given date using the `yyyy-MM-DD` format. (optional)
* @param campaignId Return only budgets that pay for a given campaign. (optional)
* @param type Return only budgets with the given budget type. (optional)
* @return List<SellerBudgetMessage>
* @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
OK
-
400
List of errors encountered
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public List getBudgetsBySeller(String sellerId, String authorization, String status, Boolean withBalance, Boolean withSpend, OffsetDateTime endAfterDate, OffsetDateTime startBeforeDate, Integer campaignId, String type) throws ApiException {
ApiResponse> localVarResp = getBudgetsBySellerWithHttpInfo(sellerId, authorization, status, withBalance, withSpend, endAfterDate, startBeforeDate, campaignId, type);
return localVarResp.getData();
}
/**
* Get a collection of budgets for this seller.
* Return a collection of budgets for this seller filtered by optional filter parameters. If all parameters are omitted the entire collection to which the user has access is returned, except those whose endDate is in the past. Returned budgets must satisfy all supplied filter criteria if multiple parameters are used. See the budgets endpoint for additional details.
* @param sellerId Return only budgets belonging to the given seller. (required)
* @param authorization JWT Bearer Token (required)
* @param status Return only budgets with the given status. (optional)
* @param withBalance Return only budgets with the given status. (optional)
* @param withSpend Return budgets with any positive spend. (optional)
* @param endAfterDate Return budgets that end after the given date using the `yyyy-MM-DD` format. If param is not provided, default behavior is to only return budgets that have not yet ended. (optional)
* @param startBeforeDate Return budgets that start on or before the given date using the `yyyy-MM-DD` format. (optional)
* @param campaignId Return only budgets that pay for a given campaign. (optional)
* @param type Return only budgets with the given budget type. (optional)
* @return ApiResponse<List<SellerBudgetMessage>>
* @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
OK
-
400
List of errors encountered
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public ApiResponse> getBudgetsBySellerWithHttpInfo(String sellerId, String authorization, String status, Boolean withBalance, Boolean withSpend, OffsetDateTime endAfterDate, OffsetDateTime startBeforeDate, Integer campaignId, String type) throws ApiException {
okhttp3.Call localVarCall = getBudgetsBySellerValidateBeforeCall(sellerId, authorization, status, withBalance, withSpend, endAfterDate, startBeforeDate, campaignId, type, null);
Type localVarReturnType = new TypeToken>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get a collection of budgets for this seller. (asynchronously)
* Return a collection of budgets for this seller filtered by optional filter parameters. If all parameters are omitted the entire collection to which the user has access is returned, except those whose endDate is in the past. Returned budgets must satisfy all supplied filter criteria if multiple parameters are used. See the budgets endpoint for additional details.
* @param sellerId Return only budgets belonging to the given seller. (required)
* @param authorization JWT Bearer Token (required)
* @param status Return only budgets with the given status. (optional)
* @param withBalance Return only budgets with the given status. (optional)
* @param withSpend Return budgets with any positive spend. (optional)
* @param endAfterDate Return budgets that end after the given date using the `yyyy-MM-DD` format. If param is not provided, default behavior is to only return budgets that have not yet ended. (optional)
* @param startBeforeDate Return budgets that start on or before the given date using the `yyyy-MM-DD` format. (optional)
* @param campaignId Return only budgets that pay for a given campaign. (optional)
* @param type Return only budgets with the given budget 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
Status Code
Description
Response Headers
200
OK
-
400
List of errors encountered
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public okhttp3.Call getBudgetsBySellerAsync(String sellerId, String authorization, String status, Boolean withBalance, Boolean withSpend, OffsetDateTime endAfterDate, OffsetDateTime startBeforeDate, Integer campaignId, String type, final ApiCallback> _callback) throws ApiException {
okhttp3.Call localVarCall = getBudgetsBySellerValidateBeforeCall(sellerId, authorization, status, withBalance, withSpend, endAfterDate, startBeforeDate, campaignId, type, _callback);
Type localVarReturnType = new TypeToken>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getBudgetsBySellerCampaignId
* @param sellerCampaignId Return only budgets belonging to the given seller campaign. (required)
* @param authorization JWT Bearer Token (required)
* @param status Return only budgets with the given status. (optional)
* @param withBalance Return only budgets with a positive balance. (optional)
* @param withSpend Return budgets with a positive spend. (optional)
* @param endAfterDate Return budgets that end after the given date using the `yyyy-MM-DD` format. If param is not provided, default behavior is to only return budgets that have not yet ended. (optional)
* @param startBeforeDate Return budgets that start on or before the given date using the `yyyy-MM-DD` format. (optional)
* @param type Return only budgets with the given budget 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
Status Code
Description
Response Headers
200
OK
-
400
List of errors encountered
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public okhttp3.Call getBudgetsBySellerCampaignIdCall(String sellerCampaignId, String authorization, String status, Boolean withBalance, Boolean withSpend, OffsetDateTime endAfterDate, OffsetDateTime startBeforeDate, String type, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/v2/crp/seller-campaigns/{sellerCampaignId}/budgets"
.replaceAll("\\{" + "sellerCampaignId" + "\\}", localVarApiClient.escapeString(sellerCampaignId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
if (status != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("status", status));
}
if (withBalance != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("withBalance", withBalance));
}
if (withSpend != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("withSpend", withSpend));
}
if (endAfterDate != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("endAfterDate", endAfterDate));
}
if (startBeforeDate != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("startBeforeDate", startBeforeDate));
}
if (type != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("type", type));
}
Map localVarHeaderParams = new HashMap();
if (authorization != null) {
localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization));
}
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json", "text/json", "application/xml", "text/xml", "text/html"
};
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[] { "Authorization" };
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getBudgetsBySellerCampaignIdValidateBeforeCall(String sellerCampaignId, String authorization, String status, Boolean withBalance, Boolean withSpend, OffsetDateTime endAfterDate, OffsetDateTime startBeforeDate, String type, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'sellerCampaignId' is set
if (sellerCampaignId == null) {
throw new ApiException("Missing the required parameter 'sellerCampaignId' when calling getBudgetsBySellerCampaignId(Async)");
}
// verify the required parameter 'authorization' is set
if (authorization == null) {
throw new ApiException("Missing the required parameter 'authorization' when calling getBudgetsBySellerCampaignId(Async)");
}
okhttp3.Call localVarCall = getBudgetsBySellerCampaignIdCall(sellerCampaignId, authorization, status, withBalance, withSpend, endAfterDate, startBeforeDate, type, _callback);
return localVarCall;
}
/**
* Get a collection of budgets for this seller campaign.
* Return a collection of budgets for this seller campaign filtered by optional filter parameters. If all parameters are omitted the entire collection to which the user has access is returned, except those whose endDate is in the past. Returned budgets must satisfy all supplied filter criteria if multiple parameters are used. See the budgets endpoint for additional details.
* @param sellerCampaignId Return only budgets belonging to the given seller campaign. (required)
* @param authorization JWT Bearer Token (required)
* @param status Return only budgets with the given status. (optional)
* @param withBalance Return only budgets with a positive balance. (optional)
* @param withSpend Return budgets with a positive spend. (optional)
* @param endAfterDate Return budgets that end after the given date using the `yyyy-MM-DD` format. If param is not provided, default behavior is to only return budgets that have not yet ended. (optional)
* @param startBeforeDate Return budgets that start on or before the given date using the `yyyy-MM-DD` format. (optional)
* @param type Return only budgets with the given budget type. (optional)
* @return List<SellerBudgetMessage>
* @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
OK
-
400
List of errors encountered
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public List getBudgetsBySellerCampaignId(String sellerCampaignId, String authorization, String status, Boolean withBalance, Boolean withSpend, OffsetDateTime endAfterDate, OffsetDateTime startBeforeDate, String type) throws ApiException {
ApiResponse> localVarResp = getBudgetsBySellerCampaignIdWithHttpInfo(sellerCampaignId, authorization, status, withBalance, withSpend, endAfterDate, startBeforeDate, type);
return localVarResp.getData();
}
/**
* Get a collection of budgets for this seller campaign.
* Return a collection of budgets for this seller campaign filtered by optional filter parameters. If all parameters are omitted the entire collection to which the user has access is returned, except those whose endDate is in the past. Returned budgets must satisfy all supplied filter criteria if multiple parameters are used. See the budgets endpoint for additional details.
* @param sellerCampaignId Return only budgets belonging to the given seller campaign. (required)
* @param authorization JWT Bearer Token (required)
* @param status Return only budgets with the given status. (optional)
* @param withBalance Return only budgets with a positive balance. (optional)
* @param withSpend Return budgets with a positive spend. (optional)
* @param endAfterDate Return budgets that end after the given date using the `yyyy-MM-DD` format. If param is not provided, default behavior is to only return budgets that have not yet ended. (optional)
* @param startBeforeDate Return budgets that start on or before the given date using the `yyyy-MM-DD` format. (optional)
* @param type Return only budgets with the given budget type. (optional)
* @return ApiResponse<List<SellerBudgetMessage>>
* @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
OK
-
400
List of errors encountered
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public ApiResponse> getBudgetsBySellerCampaignIdWithHttpInfo(String sellerCampaignId, String authorization, String status, Boolean withBalance, Boolean withSpend, OffsetDateTime endAfterDate, OffsetDateTime startBeforeDate, String type) throws ApiException {
okhttp3.Call localVarCall = getBudgetsBySellerCampaignIdValidateBeforeCall(sellerCampaignId, authorization, status, withBalance, withSpend, endAfterDate, startBeforeDate, type, null);
Type localVarReturnType = new TypeToken>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get a collection of budgets for this seller campaign. (asynchronously)
* Return a collection of budgets for this seller campaign filtered by optional filter parameters. If all parameters are omitted the entire collection to which the user has access is returned, except those whose endDate is in the past. Returned budgets must satisfy all supplied filter criteria if multiple parameters are used. See the budgets endpoint for additional details.
* @param sellerCampaignId Return only budgets belonging to the given seller campaign. (required)
* @param authorization JWT Bearer Token (required)
* @param status Return only budgets with the given status. (optional)
* @param withBalance Return only budgets with a positive balance. (optional)
* @param withSpend Return budgets with a positive spend. (optional)
* @param endAfterDate Return budgets that end after the given date using the `yyyy-MM-DD` format. If param is not provided, default behavior is to only return budgets that have not yet ended. (optional)
* @param startBeforeDate Return budgets that start on or before the given date using the `yyyy-MM-DD` format. (optional)
* @param type Return only budgets with the given budget 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
Status Code
Description
Response Headers
200
OK
-
400
List of errors encountered
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public okhttp3.Call getBudgetsBySellerCampaignIdAsync(String sellerCampaignId, String authorization, String status, Boolean withBalance, Boolean withSpend, OffsetDateTime endAfterDate, OffsetDateTime startBeforeDate, String type, final ApiCallback> _callback) throws ApiException {
okhttp3.Call localVarCall = getBudgetsBySellerCampaignIdValidateBeforeCall(sellerCampaignId, authorization, status, withBalance, withSpend, endAfterDate, startBeforeDate, type, _callback);
Type localVarReturnType = new TypeToken>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getSeller
* @param sellerId Id of the seller. (required)
* @param authorization JWT Bearer Token (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
OK
-
400
List of errors encountered
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public okhttp3.Call getSellerCall(String sellerId, String authorization, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/v2/crp/sellers/{sellerId}"
.replaceAll("\\{" + "sellerId" + "\\}", localVarApiClient.escapeString(sellerId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
if (authorization != null) {
localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization));
}
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json", "text/json", "application/xml", "text/xml", "text/html"
};
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[] { "Authorization" };
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getSellerValidateBeforeCall(String sellerId, String authorization, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'sellerId' is set
if (sellerId == null) {
throw new ApiException("Missing the required parameter 'sellerId' when calling getSeller(Async)");
}
// verify the required parameter 'authorization' is set
if (authorization == null) {
throw new ApiException("Missing the required parameter 'authorization' when calling getSeller(Async)");
}
okhttp3.Call localVarCall = getSellerCall(sellerId, authorization, _callback);
return localVarCall;
}
/**
* Get details for a seller.
* Returns details for the selected seller. For example { \"id\" : \"123456\" \"sellerName\": \"HBogart\", }
* @param sellerId Id of the seller. (required)
* @param authorization JWT Bearer Token (required)
* @return SellerBase
* @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
OK
-
400
List of errors encountered
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public SellerBase getSeller(String sellerId, String authorization) throws ApiException {
ApiResponse localVarResp = getSellerWithHttpInfo(sellerId, authorization);
return localVarResp.getData();
}
/**
* Get details for a seller.
* Returns details for the selected seller. For example { \"id\" : \"123456\" \"sellerName\": \"HBogart\", }
* @param sellerId Id of the seller. (required)
* @param authorization JWT Bearer Token (required)
* @return ApiResponse<SellerBase>
* @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
OK
-
400
List of errors encountered
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public ApiResponse getSellerWithHttpInfo(String sellerId, String authorization) throws ApiException {
okhttp3.Call localVarCall = getSellerValidateBeforeCall(sellerId, authorization, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get details for a seller. (asynchronously)
* Returns details for the selected seller. For example { \"id\" : \"123456\" \"sellerName\": \"HBogart\", }
* @param sellerId Id of the seller. (required)
* @param authorization JWT Bearer Token (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
OK
-
400
List of errors encountered
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public okhttp3.Call getSellerAsync(String sellerId, String authorization, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getSellerValidateBeforeCall(sellerId, authorization, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getSellerBudget
* @param budgetId (required)
* @param authorization JWT Bearer Token (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
OK
-
400
List of errors encountered
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public okhttp3.Call getSellerBudgetCall(Long budgetId, String authorization, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/v2/crp/budgets/{budgetId}"
.replaceAll("\\{" + "budgetId" + "\\}", localVarApiClient.escapeString(budgetId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
if (authorization != null) {
localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization));
}
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json", "text/json", "text/html"
};
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[] { "Authorization" };
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getSellerBudgetValidateBeforeCall(Long budgetId, String authorization, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'budgetId' is set
if (budgetId == null) {
throw new ApiException("Missing the required parameter 'budgetId' when calling getSellerBudget(Async)");
}
// verify the required parameter 'authorization' is set
if (authorization == null) {
throw new ApiException("Missing the required parameter 'authorization' when calling getSellerBudget(Async)");
}
okhttp3.Call localVarCall = getSellerBudgetCall(budgetId, authorization, _callback);
return localVarCall;
}
/**
* Get details for a budget.
* Return a budget. For example: { \"id\": \"1759183\", \"sellerId\": \"321392\", \"campaignIds\": [ 143962 ], \"budgetType\": \"Capped\", \"amount\": 1000, \"startDate\": \"2021-01-11\", \"endDate\": \"2021-01-12\", \"spend\": null, \"status\": \"Active\" } A budget limits the spend of a seller for one or more campaigns. There are three types of budget:<br /><b>Uncapped</b> budgets put no limit on the total amount of spend.<br /><b>Capped</b> budgets limit the total spend to a fixed amount.<br /><b>Daily</b> budgets limit daily spend to a fixed amount.<br /> In addition, budgets can limit the spend to a specific range of dates using the start and end date attributes. Finally a budget must be active to be used. <b>Spend</b> approximates the current spend against this budget. There may be a lag between when an ad is clicked and the time it accrues to the spend. Daily budgets show spend against the most recent day only.
* @param budgetId (required)
* @param authorization JWT Bearer Token (required)
* @return SellerBudgetMessage
* @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
OK
-
400
List of errors encountered
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public SellerBudgetMessage getSellerBudget(Long budgetId, String authorization) throws ApiException {
ApiResponse localVarResp = getSellerBudgetWithHttpInfo(budgetId, authorization);
return localVarResp.getData();
}
/**
* Get details for a budget.
* Return a budget. For example: { \"id\": \"1759183\", \"sellerId\": \"321392\", \"campaignIds\": [ 143962 ], \"budgetType\": \"Capped\", \"amount\": 1000, \"startDate\": \"2021-01-11\", \"endDate\": \"2021-01-12\", \"spend\": null, \"status\": \"Active\" } A budget limits the spend of a seller for one or more campaigns. There are three types of budget:<br /><b>Uncapped</b> budgets put no limit on the total amount of spend.<br /><b>Capped</b> budgets limit the total spend to a fixed amount.<br /><b>Daily</b> budgets limit daily spend to a fixed amount.<br /> In addition, budgets can limit the spend to a specific range of dates using the start and end date attributes. Finally a budget must be active to be used. <b>Spend</b> approximates the current spend against this budget. There may be a lag between when an ad is clicked and the time it accrues to the spend. Daily budgets show spend against the most recent day only.
* @param budgetId (required)
* @param authorization JWT Bearer Token (required)
* @return ApiResponse<SellerBudgetMessage>
* @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
OK
-
400
List of errors encountered
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public ApiResponse getSellerBudgetWithHttpInfo(Long budgetId, String authorization) throws ApiException {
okhttp3.Call localVarCall = getSellerBudgetValidateBeforeCall(budgetId, authorization, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get details for a budget. (asynchronously)
* Return a budget. For example: { \"id\": \"1759183\", \"sellerId\": \"321392\", \"campaignIds\": [ 143962 ], \"budgetType\": \"Capped\", \"amount\": 1000, \"startDate\": \"2021-01-11\", \"endDate\": \"2021-01-12\", \"spend\": null, \"status\": \"Active\" } A budget limits the spend of a seller for one or more campaigns. There are three types of budget:<br /><b>Uncapped</b> budgets put no limit on the total amount of spend.<br /><b>Capped</b> budgets limit the total spend to a fixed amount.<br /><b>Daily</b> budgets limit daily spend to a fixed amount.<br /> In addition, budgets can limit the spend to a specific range of dates using the start and end date attributes. Finally a budget must be active to be used. <b>Spend</b> approximates the current spend against this budget. There may be a lag between when an ad is clicked and the time it accrues to the spend. Daily budgets show spend against the most recent day only.
* @param budgetId (required)
* @param authorization JWT Bearer Token (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
OK
-
400
List of errors encountered
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public okhttp3.Call getSellerBudgetAsync(Long budgetId, String authorization, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getSellerBudgetValidateBeforeCall(budgetId, authorization, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getSellerBudgets
* @param authorization JWT Bearer Token (required)
* @param status Return only budgets with the given status. (optional)
* @param withBalance Return only budgets with the given status. (optional)
* @param withSpend Return budgets with any positive spend. (optional)
* @param endAfterDate Return budgets that end after the given date using the `yyyy-MM-DD` format. If param is not provided, default behavior is to only return budgets that have not yet ended. (optional)
* @param startBeforeDate Return budgets that start on or before the given date using the `yyyy-MM-DD` format. (optional)
* @param campaignId Return only budgets that pay for a given campaign. (optional)
* @param sellerId Return only budgets belonging to the given seller. (optional)
* @param type Return only budgets with the given budget 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
Status Code
Description
Response Headers
200
OK
-
400
List of errors encountered
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public okhttp3.Call getSellerBudgetsCall(String authorization, String status, Boolean withBalance, Boolean withSpend, OffsetDateTime endAfterDate, OffsetDateTime startBeforeDate, Integer campaignId, String sellerId, String type, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/v2/crp/budgets";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
if (status != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("status", status));
}
if (withBalance != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("withBalance", withBalance));
}
if (withSpend != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("withSpend", withSpend));
}
if (endAfterDate != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("endAfterDate", endAfterDate));
}
if (startBeforeDate != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("startBeforeDate", startBeforeDate));
}
if (campaignId != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("campaignId", campaignId));
}
if (sellerId != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("sellerId", sellerId));
}
if (type != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("type", type));
}
Map localVarHeaderParams = new HashMap();
if (authorization != null) {
localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization));
}
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json", "text/json", "application/xml", "text/xml", "text/html"
};
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[] { "Authorization" };
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getSellerBudgetsValidateBeforeCall(String authorization, String status, Boolean withBalance, Boolean withSpend, OffsetDateTime endAfterDate, OffsetDateTime startBeforeDate, Integer campaignId, String sellerId, String type, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'authorization' is set
if (authorization == null) {
throw new ApiException("Missing the required parameter 'authorization' when calling getSellerBudgets(Async)");
}
okhttp3.Call localVarCall = getSellerBudgetsCall(authorization, status, withBalance, withSpend, endAfterDate, startBeforeDate, campaignId, sellerId, type, _callback);
return localVarCall;
}
/**
* Get a collection of budgets.
* Return a collection of budgets filtered by optional filter parameters. If all parameters are omitted the entire collection to which the user has access is returned, except those whose endDate is in the past. Returned budgets must satisfy all supplied filter criteria if multiple parameters are used. <b>Date filter.</b> Filtering can return only budgets that were active for a date range by specifying the startBeforeDate and endAfterDate. Leaving off the startBeforeDate value makes budgets with any startDate qualify, whereas when leaving off the endAfterDate value will only return budgets whose endDate has not already passed. To get budgets that were active on a specific date, set both values to that day. <b>Spend.</b> If the endAfterDate is supplied, the spend excludes spend that happened after that date. In the case of a daily budget, only the spend for the final day is displayed. See the budgets endpoint for additional details.
* @param authorization JWT Bearer Token (required)
* @param status Return only budgets with the given status. (optional)
* @param withBalance Return only budgets with the given status. (optional)
* @param withSpend Return budgets with any positive spend. (optional)
* @param endAfterDate Return budgets that end after the given date using the `yyyy-MM-DD` format. If param is not provided, default behavior is to only return budgets that have not yet ended. (optional)
* @param startBeforeDate Return budgets that start on or before the given date using the `yyyy-MM-DD` format. (optional)
* @param campaignId Return only budgets that pay for a given campaign. (optional)
* @param sellerId Return only budgets belonging to the given seller. (optional)
* @param type Return only budgets with the given budget type. (optional)
* @return List<SellerBudgetMessage>
* @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
OK
-
400
List of errors encountered
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public List getSellerBudgets(String authorization, String status, Boolean withBalance, Boolean withSpend, OffsetDateTime endAfterDate, OffsetDateTime startBeforeDate, Integer campaignId, String sellerId, String type) throws ApiException {
ApiResponse> localVarResp = getSellerBudgetsWithHttpInfo(authorization, status, withBalance, withSpend, endAfterDate, startBeforeDate, campaignId, sellerId, type);
return localVarResp.getData();
}
/**
* Get a collection of budgets.
* Return a collection of budgets filtered by optional filter parameters. If all parameters are omitted the entire collection to which the user has access is returned, except those whose endDate is in the past. Returned budgets must satisfy all supplied filter criteria if multiple parameters are used. <b>Date filter.</b> Filtering can return only budgets that were active for a date range by specifying the startBeforeDate and endAfterDate. Leaving off the startBeforeDate value makes budgets with any startDate qualify, whereas when leaving off the endAfterDate value will only return budgets whose endDate has not already passed. To get budgets that were active on a specific date, set both values to that day. <b>Spend.</b> If the endAfterDate is supplied, the spend excludes spend that happened after that date. In the case of a daily budget, only the spend for the final day is displayed. See the budgets endpoint for additional details.
* @param authorization JWT Bearer Token (required)
* @param status Return only budgets with the given status. (optional)
* @param withBalance Return only budgets with the given status. (optional)
* @param withSpend Return budgets with any positive spend. (optional)
* @param endAfterDate Return budgets that end after the given date using the `yyyy-MM-DD` format. If param is not provided, default behavior is to only return budgets that have not yet ended. (optional)
* @param startBeforeDate Return budgets that start on or before the given date using the `yyyy-MM-DD` format. (optional)
* @param campaignId Return only budgets that pay for a given campaign. (optional)
* @param sellerId Return only budgets belonging to the given seller. (optional)
* @param type Return only budgets with the given budget type. (optional)
* @return ApiResponse<List<SellerBudgetMessage>>
* @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
OK
-
400
List of errors encountered
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public ApiResponse> getSellerBudgetsWithHttpInfo(String authorization, String status, Boolean withBalance, Boolean withSpend, OffsetDateTime endAfterDate, OffsetDateTime startBeforeDate, Integer campaignId, String sellerId, String type) throws ApiException {
okhttp3.Call localVarCall = getSellerBudgetsValidateBeforeCall(authorization, status, withBalance, withSpend, endAfterDate, startBeforeDate, campaignId, sellerId, type, null);
Type localVarReturnType = new TypeToken>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get a collection of budgets. (asynchronously)
* Return a collection of budgets filtered by optional filter parameters. If all parameters are omitted the entire collection to which the user has access is returned, except those whose endDate is in the past. Returned budgets must satisfy all supplied filter criteria if multiple parameters are used. <b>Date filter.</b> Filtering can return only budgets that were active for a date range by specifying the startBeforeDate and endAfterDate. Leaving off the startBeforeDate value makes budgets with any startDate qualify, whereas when leaving off the endAfterDate value will only return budgets whose endDate has not already passed. To get budgets that were active on a specific date, set both values to that day. <b>Spend.</b> If the endAfterDate is supplied, the spend excludes spend that happened after that date. In the case of a daily budget, only the spend for the final day is displayed. See the budgets endpoint for additional details.
* @param authorization JWT Bearer Token (required)
* @param status Return only budgets with the given status. (optional)
* @param withBalance Return only budgets with the given status. (optional)
* @param withSpend Return budgets with any positive spend. (optional)
* @param endAfterDate Return budgets that end after the given date using the `yyyy-MM-DD` format. If param is not provided, default behavior is to only return budgets that have not yet ended. (optional)
* @param startBeforeDate Return budgets that start on or before the given date using the `yyyy-MM-DD` format. (optional)
* @param campaignId Return only budgets that pay for a given campaign. (optional)
* @param sellerId Return only budgets belonging to the given seller. (optional)
* @param type Return only budgets with the given budget 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
Status Code
Description
Response Headers
200
OK
-
400
List of errors encountered
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public okhttp3.Call getSellerBudgetsAsync(String authorization, String status, Boolean withBalance, Boolean withSpend, OffsetDateTime endAfterDate, OffsetDateTime startBeforeDate, Integer campaignId, String sellerId, String type, final ApiCallback> _callback) throws ApiException {
okhttp3.Call localVarCall = getSellerBudgetsValidateBeforeCall(authorization, status, withBalance, withSpend, endAfterDate, startBeforeDate, campaignId, sellerId, type, _callback);
Type localVarReturnType = new TypeToken>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getSellerCampaign
* @param sellerCampaignId Id of the seller campaign. (required)
* @param authorization JWT Bearer Token (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
OK
-
400
List of errors encountered
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public okhttp3.Call getSellerCampaignCall(String sellerCampaignId, String authorization, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/v2/crp/seller-campaigns/{sellerCampaignId}"
.replaceAll("\\{" + "sellerCampaignId" + "\\}", localVarApiClient.escapeString(sellerCampaignId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
if (authorization != null) {
localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization));
}
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json", "text/json", "text/html"
};
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[] { "Authorization" };
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getSellerCampaignValidateBeforeCall(String sellerCampaignId, String authorization, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'sellerCampaignId' is set
if (sellerCampaignId == null) {
throw new ApiException("Missing the required parameter 'sellerCampaignId' when calling getSellerCampaign(Async)");
}
// verify the required parameter 'authorization' is set
if (authorization == null) {
throw new ApiException("Missing the required parameter 'authorization' when calling getSellerCampaign(Async)");
}
okhttp3.Call localVarCall = getSellerCampaignCall(sellerCampaignId, authorization, _callback);
return localVarCall;
}
/**
* Get details for a seller campaign.
* Return details for a seller campaign. For example, { \"id\": \"543210.123456\", \"suspendedSince\": \"2018-07-30\", \"sellerId\": \"543210\", \"campaignId\": 123456, \"bid\": 1.55 } An active seller campaign is one for which the value of <b>suspendedSince</b> is null and the <b>bid</b> is positive. The currency of the bid is the <b>bidCurrency</b> of the associated campaign. Any active seller campaign must also have an active total (capped or uncapped) budget. It may optionally have an active daily budget as well to further limit spending.
* @param sellerCampaignId Id of the seller campaign. (required)
* @param authorization JWT Bearer Token (required)
* @return SellerCampaignMessage
* @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
OK
-
400
List of errors encountered
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public SellerCampaignMessage getSellerCampaign(String sellerCampaignId, String authorization) throws ApiException {
ApiResponse localVarResp = getSellerCampaignWithHttpInfo(sellerCampaignId, authorization);
return localVarResp.getData();
}
/**
* Get details for a seller campaign.
* Return details for a seller campaign. For example, { \"id\": \"543210.123456\", \"suspendedSince\": \"2018-07-30\", \"sellerId\": \"543210\", \"campaignId\": 123456, \"bid\": 1.55 } An active seller campaign is one for which the value of <b>suspendedSince</b> is null and the <b>bid</b> is positive. The currency of the bid is the <b>bidCurrency</b> of the associated campaign. Any active seller campaign must also have an active total (capped or uncapped) budget. It may optionally have an active daily budget as well to further limit spending.
* @param sellerCampaignId Id of the seller campaign. (required)
* @param authorization JWT Bearer Token (required)
* @return ApiResponse<SellerCampaignMessage>
* @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
OK
-
400
List of errors encountered
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public ApiResponse getSellerCampaignWithHttpInfo(String sellerCampaignId, String authorization) throws ApiException {
okhttp3.Call localVarCall = getSellerCampaignValidateBeforeCall(sellerCampaignId, authorization, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get details for a seller campaign. (asynchronously)
* Return details for a seller campaign. For example, { \"id\": \"543210.123456\", \"suspendedSince\": \"2018-07-30\", \"sellerId\": \"543210\", \"campaignId\": 123456, \"bid\": 1.55 } An active seller campaign is one for which the value of <b>suspendedSince</b> is null and the <b>bid</b> is positive. The currency of the bid is the <b>bidCurrency</b> of the associated campaign. Any active seller campaign must also have an active total (capped or uncapped) budget. It may optionally have an active daily budget as well to further limit spending.
* @param sellerCampaignId Id of the seller campaign. (required)
* @param authorization JWT Bearer Token (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
OK
-
400
List of errors encountered
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public okhttp3.Call getSellerCampaignAsync(String sellerCampaignId, String authorization, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getSellerCampaignValidateBeforeCall(sellerCampaignId, authorization, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getSellerCampaigns
* @param authorization JWT Bearer Token (required)
* @param sellerStatus Return only seller campaigns for sellers with the given status. (optional)
* @param sellerId Return only seller campaigns belonging to the given seller. (optional)
* @param campaignId Return only seller campaigns associated with the given campaign. (optional)
* @param budgetStatus Return only seller campaigns whose budget has the given status. (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
OK
-
400
List of errors encountered
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public okhttp3.Call getSellerCampaignsCall(String authorization, String sellerStatus, String sellerId, Integer campaignId, String budgetStatus, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/v2/crp/seller-campaigns";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
if (sellerStatus != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("sellerStatus", sellerStatus));
}
if (sellerId != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("sellerId", sellerId));
}
if (campaignId != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("campaignId", campaignId));
}
if (budgetStatus != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("budgetStatus", budgetStatus));
}
Map localVarHeaderParams = new HashMap();
if (authorization != null) {
localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization));
}
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json", "text/json", "application/xml", "text/xml", "text/html"
};
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[] { "Authorization" };
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getSellerCampaignsValidateBeforeCall(String authorization, String sellerStatus, String sellerId, Integer campaignId, String budgetStatus, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'authorization' is set
if (authorization == null) {
throw new ApiException("Missing the required parameter 'authorization' when calling getSellerCampaigns(Async)");
}
okhttp3.Call localVarCall = getSellerCampaignsCall(authorization, sellerStatus, sellerId, campaignId, budgetStatus, _callback);
return localVarCall;
}
/**
* Get a collection of seller campaigns.
* Return a collection of seller campaigns filtered by optional filter parameters. If all parameters are omitted the entire collection to which the user has access is returned. Returned sellers must satisfy all supplied filter criteria if multiple parameters are used.
* @param authorization JWT Bearer Token (required)
* @param sellerStatus Return only seller campaigns for sellers with the given status. (optional)
* @param sellerId Return only seller campaigns belonging to the given seller. (optional)
* @param campaignId Return only seller campaigns associated with the given campaign. (optional)
* @param budgetStatus Return only seller campaigns whose budget has the given status. (optional)
* @return List<SellerCampaignMessage>
* @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
OK
-
400
List of errors encountered
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public List getSellerCampaigns(String authorization, String sellerStatus, String sellerId, Integer campaignId, String budgetStatus) throws ApiException {
ApiResponse> localVarResp = getSellerCampaignsWithHttpInfo(authorization, sellerStatus, sellerId, campaignId, budgetStatus);
return localVarResp.getData();
}
/**
* Get a collection of seller campaigns.
* Return a collection of seller campaigns filtered by optional filter parameters. If all parameters are omitted the entire collection to which the user has access is returned. Returned sellers must satisfy all supplied filter criteria if multiple parameters are used.
* @param authorization JWT Bearer Token (required)
* @param sellerStatus Return only seller campaigns for sellers with the given status. (optional)
* @param sellerId Return only seller campaigns belonging to the given seller. (optional)
* @param campaignId Return only seller campaigns associated with the given campaign. (optional)
* @param budgetStatus Return only seller campaigns whose budget has the given status. (optional)
* @return ApiResponse<List<SellerCampaignMessage>>
* @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
OK
-
400
List of errors encountered
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public ApiResponse> getSellerCampaignsWithHttpInfo(String authorization, String sellerStatus, String sellerId, Integer campaignId, String budgetStatus) throws ApiException {
okhttp3.Call localVarCall = getSellerCampaignsValidateBeforeCall(authorization, sellerStatus, sellerId, campaignId, budgetStatus, null);
Type localVarReturnType = new TypeToken>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get a collection of seller campaigns. (asynchronously)
* Return a collection of seller campaigns filtered by optional filter parameters. If all parameters are omitted the entire collection to which the user has access is returned. Returned sellers must satisfy all supplied filter criteria if multiple parameters are used.
* @param authorization JWT Bearer Token (required)
* @param sellerStatus Return only seller campaigns for sellers with the given status. (optional)
* @param sellerId Return only seller campaigns belonging to the given seller. (optional)
* @param campaignId Return only seller campaigns associated with the given campaign. (optional)
* @param budgetStatus Return only seller campaigns whose budget has the given status. (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
OK
-
400
List of errors encountered
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public okhttp3.Call getSellerCampaignsAsync(String authorization, String sellerStatus, String sellerId, Integer campaignId, String budgetStatus, final ApiCallback> _callback) throws ApiException {
okhttp3.Call localVarCall = getSellerCampaignsValidateBeforeCall(authorization, sellerStatus, sellerId, campaignId, budgetStatus, _callback);
Type localVarReturnType = new TypeToken>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getSellerCampaignsBySeller
* @param sellerId Return only seller campaigns belonging to the given seller. (required)
* @param authorization JWT Bearer Token (required)
* @param sellerStatus Return only seller campaigns for sellers with the given status. (optional)
* @param campaignId Return only seller campaigns associated with the given campaign. (optional)
* @param budgetStatus Return only seller campaigns whose budget has the given status. (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
OK
-
400
List of errors encountered
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public okhttp3.Call getSellerCampaignsBySellerCall(String sellerId, String authorization, String sellerStatus, Integer campaignId, String budgetStatus, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/v2/crp/sellers/{sellerId}/seller-campaigns"
.replaceAll("\\{" + "sellerId" + "\\}", localVarApiClient.escapeString(sellerId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
if (sellerStatus != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("sellerStatus", sellerStatus));
}
if (campaignId != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("campaignId", campaignId));
}
if (budgetStatus != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("budgetStatus", budgetStatus));
}
Map localVarHeaderParams = new HashMap();
if (authorization != null) {
localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization));
}
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json", "text/json", "application/xml", "text/xml", "text/html"
};
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[] { "Authorization" };
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getSellerCampaignsBySellerValidateBeforeCall(String sellerId, String authorization, String sellerStatus, Integer campaignId, String budgetStatus, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'sellerId' is set
if (sellerId == null) {
throw new ApiException("Missing the required parameter 'sellerId' when calling getSellerCampaignsBySeller(Async)");
}
// verify the required parameter 'authorization' is set
if (authorization == null) {
throw new ApiException("Missing the required parameter 'authorization' when calling getSellerCampaignsBySeller(Async)");
}
okhttp3.Call localVarCall = getSellerCampaignsBySellerCall(sellerId, authorization, sellerStatus, campaignId, budgetStatus, _callback);
return localVarCall;
}
/**
* Get a collection of seller campaigns for this seller.
* Return a collection of seller campaigns for this seller filtered by optional filter parameters. If all parameters are omitted the entire collection to which the user has access is returned. Returned sellers must satisfy all supplied filter criteria if multiple parameters are used. See the seller campaigns endpoint for additional details.
* @param sellerId Return only seller campaigns belonging to the given seller. (required)
* @param authorization JWT Bearer Token (required)
* @param sellerStatus Return only seller campaigns for sellers with the given status. (optional)
* @param campaignId Return only seller campaigns associated with the given campaign. (optional)
* @param budgetStatus Return only seller campaigns whose budget has the given status. (optional)
* @return List<SellerCampaignMessage>
* @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
OK
-
400
List of errors encountered
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public List getSellerCampaignsBySeller(String sellerId, String authorization, String sellerStatus, Integer campaignId, String budgetStatus) throws ApiException {
ApiResponse> localVarResp = getSellerCampaignsBySellerWithHttpInfo(sellerId, authorization, sellerStatus, campaignId, budgetStatus);
return localVarResp.getData();
}
/**
* Get a collection of seller campaigns for this seller.
* Return a collection of seller campaigns for this seller filtered by optional filter parameters. If all parameters are omitted the entire collection to which the user has access is returned. Returned sellers must satisfy all supplied filter criteria if multiple parameters are used. See the seller campaigns endpoint for additional details.
* @param sellerId Return only seller campaigns belonging to the given seller. (required)
* @param authorization JWT Bearer Token (required)
* @param sellerStatus Return only seller campaigns for sellers with the given status. (optional)
* @param campaignId Return only seller campaigns associated with the given campaign. (optional)
* @param budgetStatus Return only seller campaigns whose budget has the given status. (optional)
* @return ApiResponse<List<SellerCampaignMessage>>
* @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
OK
-
400
List of errors encountered
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public ApiResponse> getSellerCampaignsBySellerWithHttpInfo(String sellerId, String authorization, String sellerStatus, Integer campaignId, String budgetStatus) throws ApiException {
okhttp3.Call localVarCall = getSellerCampaignsBySellerValidateBeforeCall(sellerId, authorization, sellerStatus, campaignId, budgetStatus, null);
Type localVarReturnType = new TypeToken>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get a collection of seller campaigns for this seller. (asynchronously)
* Return a collection of seller campaigns for this seller filtered by optional filter parameters. If all parameters are omitted the entire collection to which the user has access is returned. Returned sellers must satisfy all supplied filter criteria if multiple parameters are used. See the seller campaigns endpoint for additional details.
* @param sellerId Return only seller campaigns belonging to the given seller. (required)
* @param authorization JWT Bearer Token (required)
* @param sellerStatus Return only seller campaigns for sellers with the given status. (optional)
* @param campaignId Return only seller campaigns associated with the given campaign. (optional)
* @param budgetStatus Return only seller campaigns whose budget has the given status. (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
OK
-
400
List of errors encountered
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public okhttp3.Call getSellerCampaignsBySellerAsync(String sellerId, String authorization, String sellerStatus, Integer campaignId, String budgetStatus, final ApiCallback> _callback) throws ApiException {
okhttp3.Call localVarCall = getSellerCampaignsBySellerValidateBeforeCall(sellerId, authorization, sellerStatus, campaignId, budgetStatus, _callback);
Type localVarReturnType = new TypeToken>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getSellers
* @param authorization JWT Bearer Token (required)
* @param sellerStatus Return only sellers with specific status. (optional)
* @param withProducts Return only sellers with or without products in catalog. (optional)
* @param withBudgetStatus Return only sellers with specific budget status. (optional)
* @param sellerName Return only sellers with the matching name. (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
OK
-
400
List of errors encountered
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public okhttp3.Call getSellersCall(String authorization, String sellerStatus, Boolean withProducts, String withBudgetStatus, String sellerName, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/v2/crp/sellers";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
if (sellerStatus != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("sellerStatus", sellerStatus));
}
if (withProducts != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("withProducts", withProducts));
}
if (withBudgetStatus != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("withBudgetStatus", withBudgetStatus));
}
if (sellerName != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("sellerName", sellerName));
}
Map localVarHeaderParams = new HashMap();
if (authorization != null) {
localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization));
}
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json", "text/json", "application/xml", "text/xml", "text/html"
};
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[] { "Authorization" };
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getSellersValidateBeforeCall(String authorization, String sellerStatus, Boolean withProducts, String withBudgetStatus, String sellerName, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'authorization' is set
if (authorization == null) {
throw new ApiException("Missing the required parameter 'authorization' when calling getSellers(Async)");
}
okhttp3.Call localVarCall = getSellersCall(authorization, sellerStatus, withProducts, withBudgetStatus, sellerName, _callback);
return localVarCall;
}
/**
* Get a collection of sellers.
* Return a collection of sellers filtered by optional filter parameters. If all parameters are omitted the entire collection to which the user has access is returned. Returned sellers must satisfy all supplied filter criteria if multiple parameters are used.
* @param authorization JWT Bearer Token (required)
* @param sellerStatus Return only sellers with specific status. (optional)
* @param withProducts Return only sellers with or without products in catalog. (optional)
* @param withBudgetStatus Return only sellers with specific budget status. (optional)
* @param sellerName Return only sellers with the matching name. (optional)
* @return List<SellerBase>
* @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
OK
-
400
List of errors encountered
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public List getSellers(String authorization, String sellerStatus, Boolean withProducts, String withBudgetStatus, String sellerName) throws ApiException {
ApiResponse> localVarResp = getSellersWithHttpInfo(authorization, sellerStatus, withProducts, withBudgetStatus, sellerName);
return localVarResp.getData();
}
/**
* Get a collection of sellers.
* Return a collection of sellers filtered by optional filter parameters. If all parameters are omitted the entire collection to which the user has access is returned. Returned sellers must satisfy all supplied filter criteria if multiple parameters are used.
* @param authorization JWT Bearer Token (required)
* @param sellerStatus Return only sellers with specific status. (optional)
* @param withProducts Return only sellers with or without products in catalog. (optional)
* @param withBudgetStatus Return only sellers with specific budget status. (optional)
* @param sellerName Return only sellers with the matching name. (optional)
* @return ApiResponse<List<SellerBase>>
* @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
OK
-
400
List of errors encountered
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public ApiResponse> getSellersWithHttpInfo(String authorization, String sellerStatus, Boolean withProducts, String withBudgetStatus, String sellerName) throws ApiException {
okhttp3.Call localVarCall = getSellersValidateBeforeCall(authorization, sellerStatus, withProducts, withBudgetStatus, sellerName, null);
Type localVarReturnType = new TypeToken>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get a collection of sellers. (asynchronously)
* Return a collection of sellers filtered by optional filter parameters. If all parameters are omitted the entire collection to which the user has access is returned. Returned sellers must satisfy all supplied filter criteria if multiple parameters are used.
* @param authorization JWT Bearer Token (required)
* @param sellerStatus Return only sellers with specific status. (optional)
* @param withProducts Return only sellers with or without products in catalog. (optional)
* @param withBudgetStatus Return only sellers with specific budget status. (optional)
* @param sellerName Return only sellers with the matching name. (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
OK
-
400
List of errors encountered
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public okhttp3.Call getSellersAsync(String authorization, String sellerStatus, Boolean withProducts, String withBudgetStatus, String sellerName, final ApiCallback> _callback) throws ApiException {
okhttp3.Call localVarCall = getSellersValidateBeforeCall(authorization, sellerStatus, withProducts, withBudgetStatus, sellerName, _callback);
Type localVarReturnType = new TypeToken>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for updateSellerBudget
* @param budgetId (required)
* @param authorization JWT Bearer Token (required)
* @param message (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
OK
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public okhttp3.Call updateSellerBudgetCall(Long budgetId, String authorization, UpdateSellerBudgetMessageBase message, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = message;
// create path and map variables
String localVarPath = "/v2/crp/budgets/{budgetId}"
.replaceAll("\\{" + "budgetId" + "\\}", localVarApiClient.escapeString(budgetId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
if (authorization != null) {
localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization));
}
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json", "text/json", "text/html"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json", "text/json", "application/x-www-form-urlencoded", "text/html"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "Authorization" };
return localVarApiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call updateSellerBudgetValidateBeforeCall(Long budgetId, String authorization, UpdateSellerBudgetMessageBase message, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'budgetId' is set
if (budgetId == null) {
throw new ApiException("Missing the required parameter 'budgetId' when calling updateSellerBudget(Async)");
}
// verify the required parameter 'authorization' is set
if (authorization == null) {
throw new ApiException("Missing the required parameter 'authorization' when calling updateSellerBudget(Async)");
}
// verify the required parameter 'message' is set
if (message == null) {
throw new ApiException("Missing the required parameter 'message' when calling updateSellerBudget(Async)");
}
okhttp3.Call localVarCall = updateSellerBudgetCall(budgetId, authorization, message, _callback);
return localVarCall;
}
/**
* Modify a single budget.
* Modify an existing active budget to change its limitations or status. All three types of budgets can be modified. See the additional restrictions listed in the PATCH budgets endpoint.
* @param budgetId (required)
* @param authorization JWT Bearer Token (required)
* @param message (required)
* @return SellerBudgetMessage
* @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
OK
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public SellerBudgetMessage updateSellerBudget(Long budgetId, String authorization, UpdateSellerBudgetMessageBase message) throws ApiException {
ApiResponse localVarResp = updateSellerBudgetWithHttpInfo(budgetId, authorization, message);
return localVarResp.getData();
}
/**
* Modify a single budget.
* Modify an existing active budget to change its limitations or status. All three types of budgets can be modified. See the additional restrictions listed in the PATCH budgets endpoint.
* @param budgetId (required)
* @param authorization JWT Bearer Token (required)
* @param message (required)
* @return ApiResponse<SellerBudgetMessage>
* @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
OK
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public ApiResponse updateSellerBudgetWithHttpInfo(Long budgetId, String authorization, UpdateSellerBudgetMessageBase message) throws ApiException {
okhttp3.Call localVarCall = updateSellerBudgetValidateBeforeCall(budgetId, authorization, message, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Modify a single budget. (asynchronously)
* Modify an existing active budget to change its limitations or status. All three types of budgets can be modified. See the additional restrictions listed in the PATCH budgets endpoint.
* @param budgetId (required)
* @param authorization JWT Bearer Token (required)
* @param message (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
OK
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public okhttp3.Call updateSellerBudgetAsync(Long budgetId, String authorization, UpdateSellerBudgetMessageBase message, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = updateSellerBudgetValidateBeforeCall(budgetId, authorization, message, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for updateSellerBudgets
* @param authorization JWT Bearer Token (required)
* @param updateSellerBudgets (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
OK
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public okhttp3.Call updateSellerBudgetsCall(String authorization, List updateSellerBudgets, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = updateSellerBudgets;
// create path and map variables
String localVarPath = "/v2/crp/budgets";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
if (authorization != null) {
localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization));
}
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json", "text/json", "application/xml", "text/xml", "text/html"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json", "text/json", "application/xml", "text/xml", "application/x-www-form-urlencoded", "text/html"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "Authorization" };
return localVarApiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call updateSellerBudgetsValidateBeforeCall(String authorization, List updateSellerBudgets, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'authorization' is set
if (authorization == null) {
throw new ApiException("Missing the required parameter 'authorization' when calling updateSellerBudgets(Async)");
}
// verify the required parameter 'updateSellerBudgets' is set
if (updateSellerBudgets == null) {
throw new ApiException("Missing the required parameter 'updateSellerBudgets' when calling updateSellerBudgets(Async)");
}
okhttp3.Call localVarCall = updateSellerBudgetsCall(authorization, updateSellerBudgets, _callback);
return localVarCall;
}
/**
* Modify a collection of budgets.
* Modify one or more existing active budgets to change their limitations or status. All three types of budgets can be modified. The following constraints apply when modifying an existing budget. • <b>campaignIds</b>: a non-empty subset of the original campaign ids MAY be supplied<br /> • <b>amount</b>: an amount MAY be supplied only if the type is not Uncapped and if supplied it MUST be non-negative<br /> • <b>startDate</b>: a future start date MAY be supplied for budgets that have not yet started<br /> • <b>endDate</b>: an end date MAY be supplied and if supplied MUST be a future date greater than the start date<br /> Other attributes MUST NOT be supplied. Adding new campaigns to a budget is not allowed. In addition, reducing the amount for a Capped budget to a value less than the current spend not allowed.
* @param authorization JWT Bearer Token (required)
* @param updateSellerBudgets (required)
* @return List<SellerBudgetMessage>
* @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
OK
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public List updateSellerBudgets(String authorization, List updateSellerBudgets) throws ApiException {
ApiResponse> localVarResp = updateSellerBudgetsWithHttpInfo(authorization, updateSellerBudgets);
return localVarResp.getData();
}
/**
* Modify a collection of budgets.
* Modify one or more existing active budgets to change their limitations or status. All three types of budgets can be modified. The following constraints apply when modifying an existing budget. • <b>campaignIds</b>: a non-empty subset of the original campaign ids MAY be supplied<br /> • <b>amount</b>: an amount MAY be supplied only if the type is not Uncapped and if supplied it MUST be non-negative<br /> • <b>startDate</b>: a future start date MAY be supplied for budgets that have not yet started<br /> • <b>endDate</b>: an end date MAY be supplied and if supplied MUST be a future date greater than the start date<br /> Other attributes MUST NOT be supplied. Adding new campaigns to a budget is not allowed. In addition, reducing the amount for a Capped budget to a value less than the current spend not allowed.
* @param authorization JWT Bearer Token (required)
* @param updateSellerBudgets (required)
* @return ApiResponse<List<SellerBudgetMessage>>
* @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
OK
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public ApiResponse> updateSellerBudgetsWithHttpInfo(String authorization, List updateSellerBudgets) throws ApiException {
okhttp3.Call localVarCall = updateSellerBudgetsValidateBeforeCall(authorization, updateSellerBudgets, null);
Type localVarReturnType = new TypeToken>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Modify a collection of budgets. (asynchronously)
* Modify one or more existing active budgets to change their limitations or status. All three types of budgets can be modified. The following constraints apply when modifying an existing budget. • <b>campaignIds</b>: a non-empty subset of the original campaign ids MAY be supplied<br /> • <b>amount</b>: an amount MAY be supplied only if the type is not Uncapped and if supplied it MUST be non-negative<br /> • <b>startDate</b>: a future start date MAY be supplied for budgets that have not yet started<br /> • <b>endDate</b>: an end date MAY be supplied and if supplied MUST be a future date greater than the start date<br /> Other attributes MUST NOT be supplied. Adding new campaigns to a budget is not allowed. In addition, reducing the amount for a Capped budget to a value less than the current spend not allowed.
* @param authorization JWT Bearer Token (required)
* @param updateSellerBudgets (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
OK
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public okhttp3.Call updateSellerBudgetsAsync(String authorization, List updateSellerBudgets, final ApiCallback> _callback) throws ApiException {
okhttp3.Call localVarCall = updateSellerBudgetsValidateBeforeCall(authorization, updateSellerBudgets, _callback);
Type localVarReturnType = new TypeToken>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for updateSellerCampaign
* @param sellerCampaignId Id of the existing seller campaign to update (required)
* @param bid The new bid for the seller campaign. (required)
* @param authorization JWT Bearer Token (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
OK
-
400
List of errors encountered
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public okhttp3.Call updateSellerCampaignCall(String sellerCampaignId, Double bid, String authorization, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/v2/crp/seller-campaigns/{sellerCampaignId}"
.replaceAll("\\{" + "sellerCampaignId" + "\\}", localVarApiClient.escapeString(sellerCampaignId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
if (bid != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("bid", bid));
}
Map localVarHeaderParams = new HashMap();
if (authorization != null) {
localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization));
}
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json", "text/json", "text/html"
};
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[] { "Authorization" };
return localVarApiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call updateSellerCampaignValidateBeforeCall(String sellerCampaignId, Double bid, String authorization, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'sellerCampaignId' is set
if (sellerCampaignId == null) {
throw new ApiException("Missing the required parameter 'sellerCampaignId' when calling updateSellerCampaign(Async)");
}
// verify the required parameter 'bid' is set
if (bid == null) {
throw new ApiException("Missing the required parameter 'bid' when calling updateSellerCampaign(Async)");
}
// verify the required parameter 'authorization' is set
if (authorization == null) {
throw new ApiException("Missing the required parameter 'authorization' when calling updateSellerCampaign(Async)");
}
okhttp3.Call localVarCall = updateSellerCampaignCall(sellerCampaignId, bid, authorization, _callback);
return localVarCall;
}
/**
* Update an existing seller campaign.
* Patching a seller campaign allows the bid to be modified. The bid must be a non-negative value. Setting the bid to zero will make a seller campaign inactive. The currency used for bids will be the default currency of the campaign.
* @param sellerCampaignId Id of the existing seller campaign to update (required)
* @param bid The new bid for the seller campaign. (required)
* @param authorization JWT Bearer Token (required)
* @return SellerCampaignMessage
* @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
OK
-
400
List of errors encountered
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public SellerCampaignMessage updateSellerCampaign(String sellerCampaignId, Double bid, String authorization) throws ApiException {
ApiResponse localVarResp = updateSellerCampaignWithHttpInfo(sellerCampaignId, bid, authorization);
return localVarResp.getData();
}
/**
* Update an existing seller campaign.
* Patching a seller campaign allows the bid to be modified. The bid must be a non-negative value. Setting the bid to zero will make a seller campaign inactive. The currency used for bids will be the default currency of the campaign.
* @param sellerCampaignId Id of the existing seller campaign to update (required)
* @param bid The new bid for the seller campaign. (required)
* @param authorization JWT Bearer Token (required)
* @return ApiResponse<SellerCampaignMessage>
* @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
OK
-
400
List of errors encountered
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public ApiResponse updateSellerCampaignWithHttpInfo(String sellerCampaignId, Double bid, String authorization) throws ApiException {
okhttp3.Call localVarCall = updateSellerCampaignValidateBeforeCall(sellerCampaignId, bid, authorization, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Update an existing seller campaign. (asynchronously)
* Patching a seller campaign allows the bid to be modified. The bid must be a non-negative value. Setting the bid to zero will make a seller campaign inactive. The currency used for bids will be the default currency of the campaign.
* @param sellerCampaignId Id of the existing seller campaign to update (required)
* @param bid The new bid for the seller campaign. (required)
* @param authorization JWT Bearer Token (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
OK
-
400
List of errors encountered
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public okhttp3.Call updateSellerCampaignAsync(String sellerCampaignId, Double bid, String authorization, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = updateSellerCampaignValidateBeforeCall(sellerCampaignId, bid, authorization, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for updateSellerCampaigns
* @param authorization JWT Bearer Token (required)
* @param campaignMessages (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
OK
-
400
List of errors encountered
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public okhttp3.Call updateSellerCampaignsCall(String authorization, List campaignMessages, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = campaignMessages;
// create path and map variables
String localVarPath = "/v2/crp/seller-campaigns";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
if (authorization != null) {
localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization));
}
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json", "text/json", "application/xml", "text/xml", "text/html"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json", "text/json", "application/xml", "text/xml", "application/x-www-form-urlencoded", "text/html"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "Authorization" };
return localVarApiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call updateSellerCampaignsValidateBeforeCall(String authorization, List campaignMessages, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'authorization' is set
if (authorization == null) {
throw new ApiException("Missing the required parameter 'authorization' when calling updateSellerCampaigns(Async)");
}
// verify the required parameter 'campaignMessages' is set
if (campaignMessages == null) {
throw new ApiException("Missing the required parameter 'campaignMessages' when calling updateSellerCampaigns(Async)");
}
okhttp3.Call localVarCall = updateSellerCampaignsCall(authorization, campaignMessages, _callback);
return localVarCall;
}
/**
* Update a collection of seller campaigns.
* Patching a collection of seller campaigns allows their bids to be modified. Each bid must be a non-negative value. Setting the bid to zero will make a seller campaign inactive. The currency used for bids will be the default currency of the campaign.
* @param authorization JWT Bearer Token (required)
* @param campaignMessages (required)
* @return List<SellerCampaignMessage>
* @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
OK
-
400
List of errors encountered
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public List updateSellerCampaigns(String authorization, List campaignMessages) throws ApiException {
ApiResponse> localVarResp = updateSellerCampaignsWithHttpInfo(authorization, campaignMessages);
return localVarResp.getData();
}
/**
* Update a collection of seller campaigns.
* Patching a collection of seller campaigns allows their bids to be modified. Each bid must be a non-negative value. Setting the bid to zero will make a seller campaign inactive. The currency used for bids will be the default currency of the campaign.
* @param authorization JWT Bearer Token (required)
* @param campaignMessages (required)
* @return ApiResponse<List<SellerCampaignMessage>>
* @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
OK
-
400
List of errors encountered
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public ApiResponse> updateSellerCampaignsWithHttpInfo(String authorization, List campaignMessages) throws ApiException {
okhttp3.Call localVarCall = updateSellerCampaignsValidateBeforeCall(authorization, campaignMessages, null);
Type localVarReturnType = new TypeToken>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Update a collection of seller campaigns. (asynchronously)
* Patching a collection of seller campaigns allows their bids to be modified. Each bid must be a non-negative value. Setting the bid to zero will make a seller campaign inactive. The currency used for bids will be the default currency of the campaign.
* @param authorization JWT Bearer Token (required)
* @param campaignMessages (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
OK
-
400
List of errors encountered
-
401
Authentication failed.
-
403
You do not have access to the requested records
-
429
Throttling failure. Maximum sending rate exceeded.
-
500
Unknown error.
-
*/
public okhttp3.Call updateSellerCampaignsAsync(String authorization, List campaignMessages, final ApiCallback> _callback) throws ApiException {
okhttp3.Call localVarCall = updateSellerCampaignsValidateBeforeCall(authorization, campaignMessages, _callback);
Type localVarReturnType = new TypeToken>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
}