com.ebay.sdk.call.GetCategorySpecificsCall Maven / Gradle / Ivy
/*
Copyright (c) 2013 eBay, Inc.
This program is licensed under the terms of the eBay Common Development and
Distribution License (CDDL) Version 1.0 (the "License") and any subsequent version
thereof released by eBay. The then-current version of the License can be found
at http://www.opensource.org/licenses/cddl1.php and in the eBaySDKLicense file that
is under the eBay SDK ../docs directory.
*/
package com.ebay.sdk.call;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.Calendar;
import com.ebay.sdk.*;
import com.ebay.soap.eBLBaseComponents.*;
/**
* Wrapper class of the GetCategorySpecifics call of eBay SOAP API.
*
* Title: SOAP API wrapper library.
* Description: Contains wrapper classes for eBay SOAP APIs.
* Copyright: Copyright (c) 2009
* Company: eBay Inc.
*
Input property: CategoryID
- A unique identifer for an eBay leaf-level category. Recommended Item Specifics names and values will be retrieved for each eBay category that is specified. Up to 100 CategoryID values may be specified in one call.
*
* A GetCategorySpecifics call request requires at least one of the following: a CategoryID value, a CategorySpecifics.CategoryID value, or the
* CategorySpecificsFileInfo field with its value set to true
. CategoryID values and
* CategorySpecific.CategoryID values can both be used in the same request.
*
* Keep in mind that a high number of specified categories can result in
* longer response times and larger result sets. If your call request happens to time out, you might want specify fewer categories. If any
* CategoryID values are specified more than once, only the first instance will be used.
*
Input property: LastUpdateTime
- This dateTime filter can be included and used if the user only wants to check for recently-added Item Specifics names and values for one or more categories. If this filter is used, the Item Specifics recommendation engine will only check for Item Specifics names and values that have been added/changed since the date that was passed in to this field. If this field is used, the call will not return any Item Specifics data; it will only return the Recommendations.Updated boolean field for each specified eBay category. A true
value in this field will indicate that the recommended Item Specifics names/values for the eBay category have changed since the timestamp passed in the LastUpdateTime field, and a false
value in this field will indicate that the recommended Item Specifics names/values for the eBay category have not changed since the timestamp passed in the LastUpdateTime field.
*
* Typically, you will pass in the timestamp value that was returned the last time you refreshed the list of Item Specifics names and values for the same categories. If the Recommendations.Updated flag returns true
for any eBay categories in the response, you will want to call GetCategorySpecifics again for those eBay categories to get the latest names and values. As downloading all the data may affect your application's performance, it may help to only download Item Specifics data for an eBay category if the data has changed since you last checked.
*
Input property: MaxNames
- This field can be used if you want to limit the number of Item Specifics names that are returned for each eBay category. If you only wanted to retrieve the three most popular Item Specifics names per category, you would include this field and set its value to 3
.
*
Input property: MaxValuesPerName
- This field can be used if you want to limit the number of Item Specifics values (for each Item Specifics name) that are returned for each eBay category. If you only wanted to retrieve the 10 most popular Item Specifics values per Item Specifics name per category, you would include this field and set its value to 10
.
*
Input property: Name
- This field can be used if you already have an Item Specific name in mind, and you only want the recommended values for this Item Specifics name.
* If you specify multiple eBay categories in the request, the recommendation engine may find a matching Item Specifics name for some categories, but not for others. For eBay categories where the Item Specifics name is not found, recommended Item Specifics names and values will be returned. The Item Specifics name passed in this field is case-sensitive, and wildcards are not supported.
*
Input property: CategorySpecific
- This container can be used instead of, or in conjunction with CategoryID values specified at the call request root level. The CategorySpecific container can actually be more powerful since you can pass in multiple Category ID and Item Specifics name combinations, and if you specify CategoryID values at the root level, only one (Item Specifics) Name value can be used.
*
* A GetCategorySpecifics call request requires at least one of the following: a CategoryID value, a CategorySpecifics.CategoryID value, or the
* CategorySpecificsFileInfo field with its value set to true
. CategoryID values and
* CategorySpecific.CategoryID values can both be used in the same request.
*
* Keep in mind that a high number of specified categories can result in
* longer response times and larger result sets. If your call request happens to time out, you might want specify fewer categories. If any
* CategorySpecifics.CategoryID values are specified more than once, only the first instance will be used.
*
Input property: ExcludeRelationships
- If this boolean field is included and set to true
, the Relationship container will not be returned for any Item Specifics name or value recommendations. Relationship recommendations tell you whether an Item Specific has a logical dependency another Item Specific.
*
* For example, in a clothing category, Size Type could be
* recommended as a parent of Size, because Size=Small would
* mean something different to buyers depending on whether
* Size Type=Petite or Size Type=Plus.
*
* In general, it is a good idea to retrieve and use relationship
* recommendations, as this data can help buyers find the items
* they want more easily.
*
Input property: IncludeConfidence
- If this boolean field is included and set to true
, eBay's level of confidence in the popularity of each Item Specific name and value for the specified category is returned in the response. Some sellers may find this useful when choosing whether to use eBay's recommendation or their own Item Specifics names or values.
*
* If this field is used, either one or more CategoryID values and/or one or more CategorySpecific.CategoryID values must be specified. If you try to use this field solely with the CategorySpecificsFileInfo field, the request fails and no TaskReferenceID or FileReferenceID values are returned.
*
Input property: CategorySpecificsFileInfo
- If this boolean field is included and set to true
, the response includes a FileReferenceID and
* TaskReferenceID value. Use these identifiers as inputs to the downloadFile
* call in the eBay File Transfer API. That API lets you retrieve
* a single (bulk) GetCategorySpecifics response with all the Item
* Specifics recommendations available for the requested site ID.
* (The downloadFile call downloads a .zip file as an
* attachment.)
*
* Either the CategorySpecificsFileInfo field or one or more CategoryID and/or CategorySpecific.CategoryID values are required
* in a GetCategorySpecifics call.
*
* Note:
* You can use the File Transfer API without using or learning
* about the Bulk Data Exchange API or other
* Large Merchant Services APIs.
*
*
Output property: ReturnedRecommendations
- This container provide details about recommended Item Specifics and Product Identifier types.
* Contains the most popular Item Specifics and supported/required Product Identifier types, if any, for a category
* specified in the request, or contains information about whether
* the recommendations have changed for that category since
* the LastUpdateTime you requested.
*
* The most relevant Item Specifics are returned first. If a name
* has multiple values, the first value is more popular.
*
* This node returns empty (or it's not returned) for a category if
* there is no applicable data (such as when you request a parent category, a category that has no popular Item Specifics yet,
* or a duplicate category that was already returned).
* If you pass in the CategoryID and Name fields together, but no
* matching values are found for the name, eBay returns the name
* with no values (even if the name is not recommended).
*
* If GetCategoryFeatures indicates that custom Item Specifics are
* enabled for a leaf category, but GetCategorySpecifics doesn't
* return any recommendations for that category, the seller can still
* specify their own custom Item Specifics in that category.
*
*
* Note:
* The ProductIdentifiers container is for future use, and is not currently returned in the GetCategorySpecifics call. Until the ProductIdentifiers container is wired on and returned, an alternative way to see if a Product Identifier type is required for a category is to identify the Product Identifier type through the Recommendations.NameRecommendation.Name field in the GetCategorySpecifics response, and then look at the corresponding Recommendations.NameRecommendation.ValidationRules.MinValues field. The GetCategoryFeatures call can also be used, and the seller will look for the values returned for that category under the EANEnabled, ISBNEnabled, UPCEnabled, and EANEnabled, ISBNEnabled, BrandMPNIdentifierEnabled fields that indicate the Product Identifier types that are supported/required for the category.
*
Output property: ReturnedTaskReferenceID
- A TaskReferenceID and a FileReferenceID value are returned if the CategorySpecificsFileInfo field is included in the call request and set to true
. These values will be used as inputs in the downloadFile call of the File Transfer API. That API lets you retrieve a single (bulk) GetCategorySpecifics response with all the Item Specifics recommendations available for the requested site ID. (The downloadFile call downloads a .zip file as an attachment.)
*
Output property: ReturnedFileReferenceID
- A TaskReferenceID and a FileReferenceID value are returned if the CategorySpecificsFileInfo field is included in the call request and set to true
. These values will be used as inputs in the downloadFile call of the File Transfer API. That API lets you retrieve a single (bulk) GetCategorySpecifics response with all the Item Specifics recommendations available for the requested site ID. (The downloadFile call downloads a .zip file as an attachment.)
*
* @author Ron Murphy
* @version 1.0
*/
public class GetCategorySpecificsCall extends com.ebay.sdk.ApiCall
{
private String[] categoryID = null;
private Calendar lastUpdateTime = null;
private Integer maxNames = null;
private Integer maxValuesPerName = null;
private String name = null;
private CategoryItemSpecificsType[] categorySpecific = null;
private Boolean excludeRelationships = null;
private Boolean includeConfidence = null;
private Boolean categorySpecificsFileInfo = null;
private RecommendationsType[] returnedRecommendations=null;
private String returnedTaskReferenceID=null;
private String returnedFileReferenceID=null;
/**
* Constructor.
*/
public GetCategorySpecificsCall() {
}
/**
* Constructor.
* @param apiContext The ApiContext object to be used to make the call.
*/
public GetCategorySpecificsCall(ApiContext apiContext) {
super(apiContext);
}
/**
* This is the base request type for the GetCategorySpecifics call. This call is used to retrieve recommended Item Specifics names and values for one or multiple eBay Categories.
*
*
* @throws ApiException
* @throws SdkException
* @throws Exception
* @return The RecommendationsType[] object.
*/
public RecommendationsType[] getCategorySpecifics()
throws com.ebay.sdk.ApiException, com.ebay.sdk.SdkException, java.lang.Exception
{
GetCategorySpecificsRequestType req;
req = new GetCategorySpecificsRequestType();
if (this.categoryID != null)
req.setCategoryID(this.categoryID);
if (this.lastUpdateTime != null)
req.setLastUpdateTime(this.lastUpdateTime);
if (this.maxNames != null)
req.setMaxNames(this.maxNames);
if (this.maxValuesPerName != null)
req.setMaxValuesPerName(this.maxValuesPerName);
if (this.name != null)
req.setName(this.name);
if (this.categorySpecific != null)
req.setCategorySpecific(this.categorySpecific);
if (this.excludeRelationships != null)
req.setExcludeRelationships(this.excludeRelationships);
if (this.includeConfidence != null)
req.setIncludeConfidence(this.includeConfidence);
if (this.categorySpecificsFileInfo != null)
req.setCategorySpecificsFileInfo(this.categorySpecificsFileInfo);
GetCategorySpecificsResponseType resp = (GetCategorySpecificsResponseType) execute(req);
this.returnedRecommendations = resp.getRecommendations();
this.returnedTaskReferenceID = resp.getTaskReferenceID();
this.returnedFileReferenceID = resp.getFileReferenceID();
return this.getReturnedRecommendations();
}
/**
* Gets the GetCategorySpecificsRequestType.categoryID.
* @return String[]
*/
public String[] getCategoryID()
{
return this.categoryID;
}
/**
* Sets the GetCategorySpecificsRequestType.categoryID.
* @param categoryID String[]
*/
public void setCategoryID(String[] categoryID)
{
this.categoryID = categoryID;
}
/**
* Gets the GetCategorySpecificsRequestType.categorySpecific.
* @return CategoryItemSpecificsType[]
*/
public CategoryItemSpecificsType[] getCategorySpecific()
{
return this.categorySpecific;
}
/**
* Sets the GetCategorySpecificsRequestType.categorySpecific.
* @param categorySpecific CategoryItemSpecificsType[]
*/
public void setCategorySpecific(CategoryItemSpecificsType[] categorySpecific)
{
this.categorySpecific = categorySpecific;
}
/**
* Gets the GetCategorySpecificsRequestType.categorySpecificsFileInfo.
* @return Boolean
*/
public Boolean getCategorySpecificsFileInfo()
{
return this.categorySpecificsFileInfo;
}
/**
* Sets the GetCategorySpecificsRequestType.categorySpecificsFileInfo.
* @param categorySpecificsFileInfo Boolean
*/
public void setCategorySpecificsFileInfo(Boolean categorySpecificsFileInfo)
{
this.categorySpecificsFileInfo = categorySpecificsFileInfo;
}
/**
* Gets the GetCategorySpecificsRequestType.excludeRelationships.
* @return Boolean
*/
public Boolean getExcludeRelationships()
{
return this.excludeRelationships;
}
/**
* Sets the GetCategorySpecificsRequestType.excludeRelationships.
* @param excludeRelationships Boolean
*/
public void setExcludeRelationships(Boolean excludeRelationships)
{
this.excludeRelationships = excludeRelationships;
}
/**
* Gets the GetCategorySpecificsRequestType.includeConfidence.
* @return Boolean
*/
public Boolean getIncludeConfidence()
{
return this.includeConfidence;
}
/**
* Sets the GetCategorySpecificsRequestType.includeConfidence.
* @param includeConfidence Boolean
*/
public void setIncludeConfidence(Boolean includeConfidence)
{
this.includeConfidence = includeConfidence;
}
/**
* Gets the GetCategorySpecificsRequestType.lastUpdateTime.
* @return Calendar
*/
public Calendar getLastUpdateTime()
{
return this.lastUpdateTime;
}
/**
* Sets the GetCategorySpecificsRequestType.lastUpdateTime.
* @param lastUpdateTime Calendar
*/
public void setLastUpdateTime(Calendar lastUpdateTime)
{
this.lastUpdateTime = lastUpdateTime;
}
/**
* Gets the GetCategorySpecificsRequestType.maxNames.
* @return Integer
*/
public Integer getMaxNames()
{
return this.maxNames;
}
/**
* Sets the GetCategorySpecificsRequestType.maxNames.
* @param maxNames Integer
*/
public void setMaxNames(Integer maxNames)
{
this.maxNames = maxNames;
}
/**
* Gets the GetCategorySpecificsRequestType.maxValuesPerName.
* @return Integer
*/
public Integer getMaxValuesPerName()
{
return this.maxValuesPerName;
}
/**
* Sets the GetCategorySpecificsRequestType.maxValuesPerName.
* @param maxValuesPerName Integer
*/
public void setMaxValuesPerName(Integer maxValuesPerName)
{
this.maxValuesPerName = maxValuesPerName;
}
/**
* Gets the GetCategorySpecificsRequestType.name.
* @return String
*/
public String getName()
{
return this.name;
}
/**
* Sets the GetCategorySpecificsRequestType.name.
* @param name String
*/
public void setName(String name)
{
this.name = name;
}
/**
* Valid after executing the API.
* Gets the returned GetCategorySpecificsResponseType.returnedFileReferenceID.
*
* @return String
*/
public String getReturnedFileReferenceID()
{
return this.returnedFileReferenceID;
}
/**
* Valid after executing the API.
* Gets the returned GetCategorySpecificsResponseType.returnedRecommendations.
*
* @return RecommendationsType[]
*/
public RecommendationsType[] getReturnedRecommendations()
{
return this.returnedRecommendations;
}
/**
* Valid after executing the API.
* Gets the returned GetCategorySpecificsResponseType.returnedTaskReferenceID.
*
* @return String
*/
public String getReturnedTaskReferenceID()
{
return this.returnedTaskReferenceID;
}
}