ePages 6.10 - DE_EPAGES/Ebay/API/Object/EbayCategoryTree.pm

Package DE_EPAGES::Ebay::API::Object::EbayCategoryTree

object interface for EbayCategoryTree.

Base
DE_EPAGES::Object::API::Object::Object

Functions

getAllAttributeSetIDs
getAllCSMappings
getAttributeSetIDByExtAttrSetIDAndVersion
getAttributeSetIDByExternalCategoryID
getAttributeSetVersionByExternalAttributeSetID
getAttributeSystemVersion
getCategoryListCount
getCategoryListIsUpdating
getCategoryListUpdateTime
getCategoryListUpdateTimeEbay
getCategoryListVersion
getCategoryPath
getInfoAttributeSetByAttributeSetId
getInfoAttributeValidationRulesByAttributeId
getInfoAttributeValueDependenciesByAttributeId
getInfoAttributeValuesByAttributeId
getInfoAttributesByAttributeSetId
getInfoEbayCategoriesByParentCategoryID
getInfoEbayCategory
getInfoEbayCategoryByExternalCategoryId
getInfoRootCategories
getPKeyEbayCategoryByExternalCategoryId
getUnusedAttributeSetIDs
new
setAttributeSystemVersion
setCategoryListCount
setCategoryListIsUpdating
setCategoryListUpdateTime
update
updateCSMappings

getAllAttributeSetIDs

Returns all AttributeSet IDs from table attributeset .

Syntax
my $aAllAttributeSetIDs = $EbayCategoryTree->getAllAttributeSetIDs();
Return
$aAllAttributeSetIDs (ref.array)
all AttributeSet IDs

getAllCSMappings

Get all CategorySet mappings from ebay and update the category database if $AttributeSystemVersion is not defined

Syntax
$EbayCategoryTree->getAllCSMappings($printOutput,$AttributeSystemVersion);
Input
$printOutput (boolean)
print output to console
$AttributeSystemVersion (int)
AttributeSystemVersion to request

getAttributeSetIDByExtAttrSetIDAndVersion

Returns AttributeSetID by EbaySite, AttributeSetVersion and ExtAttrSetID .

Syntax
my $AttributeSetID = $EbayCategoryTree->getAttributeSetIDByExtAttrSetIDAndVersion($ExtSetID,$AttSetVersion);
Input
$ExternalAttributeSetID (int)
ebay attribute set id
$AttributeSetVersion (int)
ebay attribute set version id
Return
$AttributeSetID (int)
internal AttributeSet ID

getAttributeSetIDByExternalCategoryID

Returns all used AttributeSet IDs .

Syntax
my $AttributeSetID = $EbayCategoryTree->getAttributeSetIDByExternalCategoryID($ID);
Input
$ExternalCategoryID (int)
ebay category id
Return
$AttributeSetID (int)
internal AttributeSet ID

getAttributeSetVersionByExternalAttributeSetID

Returns version of the AttributeSet.

Syntax
my $AttributeSetVersion = $EbayCategoryTree->getAttributeSetVersionByExternalAttributeSetID($ID);
Input
$ExternalAttributeSetID (Integer)
ebay attributeset id
Return
$AttributeSetVersion (int)
AttributeSet version

getAttributeSystemVersion

Returns version of the category CS mappings for the site.

Syntax
my $AttributeSystemVersion = $EbayCategoryTree->getAttributeSystemVersion;
Return
$AttributeSystemVersion (int)
Attribute mappings version

getCategoryListCount

Returns total count of categories for an environment.

Syntax
my $CategoryListCount = $EbayCategoryTree->getCategoryListCount;
Return
$CategoryListCount (int)
category list count

getCategoryListIsUpdating

Returns true if category list is currently updating.

Syntax
my $CategoryListIsUpdating = $EbayCategoryTree->getCategoryListIsUpdating;
Return
$getCategoryListIsUpdating (Boolean)
true if update is in process

getCategoryListUpdateTime

Returns time when list was last updated by server.

Syntax
my $CategoryListUpdateTime = $EbayCategoryTree->getCategoryListUpdateTime;
Return
$getCategoryListUpdateTime (DateTime)
time of last server update

getCategoryListUpdateTimeEbay

Returns time when list was last updated by eBay.

Syntax
my $CategoryListUpdateTimeEbay = $EbayCategoryTree->getCategoryListUpdateTimeEbay;
Return
$CategoryListUpdateTimeEbay (DateTime)
time of last ebay update

getCategoryListVersion

Returns version of an environments category list.

Syntax
my $CategoryListVersion = $EbayCategoryTree->getCategoryListVersion;
Return
$CategoryListVersion (int)
category list version

getCategoryPath

Builds a category path from the given category to the root category.

Syntax
my $ahPath = $EbayCategoryTree->getCategoryPath( $CategoryID, $MaxDepth );
Input
$CategoryID (int)
identifier of category
$MaxDepth (int)
restricts the length of the path (optional)
Return
$ahPath (reference to hash)
with following keys:
  • EbayCategoryID - internal category id - int
  • ExternalCategoryId - external category Id - numeric(20)
  • ParentCategoryID - internal parent category id (optional)- int
  • Name - name of category - nvarchar(255)
  • CategoryLevel - level from root - int
  • IsExpired - true if category is expired on eBay's side - boolean
  • IsLeaf - true if category has no sub categories - boolean
  • IsVirtual - true if category is virtual - boolean
  • AttributeSetID - attributeset id of category - int
  • UseSiteConditionAttributeSetID - true if global sets are valid for Condition - boolean
  • UseSiteReturnPolicyAttributeSetID - true if global sets are valid for ReturnPolicy - boolean

getInfoAttributeSetByAttributeSetId

Returns the attributeset by attributeset id. If no attributeset exists for the given attributeset id then "undef" is returned.

Syntax
$hAttributeSet = $EbayCategoryTree->getInfoAttributeSetByAttributeSetId($AttributeSetID);
Input
$AttributeSetID (int)
Attributeset Id
Return
$hAttributeset (reference to hash)
with following keys:
  • AttributeSetID - internal attribute set id - int
  • ExternalAttributeSetID - external attributeset id - int
  • EbaySiteID - Ebay Site identifier - int
  • AttributeSetVersion - AttributeSet version - int
  • Name - name of attributeset - nvarchar(255)

getInfoAttributeValidationRulesByAttributeId

Returns the attributevalidationrules by attribute id. If no value exists for the given attribute id then "undef" is returned.

Syntax
$ahAttributeValues = $EbayCategoryTree->getInfoAttributeValidationRulesByAttributeId($AttributeID);
Input
$AttributeID (int)
Attribute Id
Return
$hAttributeValidationRules (reference to hash)
with following keys:
  • AttributeID - internal attribute id - int
  • ExternalValidationRuleName - validation rule name - string
  • Length - length of value - int
  • Min - min value - int
  • Max - max value - int
  • Mask - mask for value (like AAA-XXXX) - string
  • PeerAttributeID - coresponding attribute id (date range check) - int
  • Precision - value display format - int
  • Regex - expression to check the value - string
  • Required - is value required - boolean
  • Separator - specifies a separator - int

getInfoAttributeValueDependenciesByAttributeId

Returns the attributevaluedependencies by attribute id. If no value exists for the given attribute id then "undef" is returned.

Syntax
$ahAttributeValues = $EbayCategoryTree->getInfoAttributeValueDependenciesByAttributeId($AttributeID);
Input
$AttributeID (int)
Attribute Id
Return
$hAttributesValueDependencies (reference to hash)
with following keys:
  • ExternalChildAttributeID - external child attribute id - int
  • ParentValueID - internal parent value id - int
  • ExternalParentValueID - external parent value id - int
  • ChildValueID - internal child value id - int
  • ExternalChildValueID - internal child value id - int
  • Name - the Value itself - string

getInfoAttributeValuesByAttributeId

Returns the attributevalues by attribute id. If no value exists for the given attribute id then "undef" is returned.

Syntax
$ahAttributeValues = $EbayCategoryTree->getInfoAttributeValuesByAttributeId($AttributeID);
Input
$AttributeID (int)
Attribute Id
Return
$hAttributes (reference to hash)
with following keys:
  • ValueID - internal value id - int
  • AttributeID - internal attribute id - int
  • ExternalValueID - external value id - int
  • Name - the Value itself - string

getInfoAttributesByAttributeSetId

Returns the attributes by attributeset id. If no attribute exists for the given attributeset id then "undef" is returned.

Syntax
$ahAttributes = $EbayCategoryTree->getInfoAttributesByAttributeSetId($AttributeSetID);
Input
$AttributeSetID (int)
Attributeset Id
Return
$hAttributes (reference to hash)
with following keys:
  • AttributeID - internal attribute id - int
  • AttributeSetID - internal attributeset id - int
  • ExternalAttributeID - external attribute id - int
  • ParentID - external parent attribute id - int
  • Type - attribute type - int
  • EditType - edit type - int
  • Label - label - string
  • LabelVisible - is label visible - boolean
  • Message - attribute message - string
  • IsRequired - is this attribute mandatory - boolean
  • CanDisplayOther - can this attribute trigger displaying an other field - boolean
  • WidgetType - widget type - string
  • InputType - type of input - string
  • InputColumns - columns of input - int
  • InputSize - size of input - int
  • InputDisplaySize - display size of input - int
  • InputMaxLength - max length of input- int
  • DefaultUnitOfMeasureFormatString - default measurement unit - int

getInfoEbayCategoriesByParentCategoryID

Returns objects of EbayCategory by alternate key ParentCategoryID.

Syntax
$ahCategories = $EbayCategoryTree->getInfoEbayCategoriesByParentCategoryID($ParentCategoryID);
Input
$ParentCategoryID (int)
internal Parent Category (not a eBay Category Id)
Return
$ahCategories (ref.array.hash)
with following keys:
  • EbayCategoryID - internal category id - int
  • ExternalCategoryId - external category Id - numeric(20)
  • ParentCategoryID - internal parent category id (optional)- int
  • EbaySiteID - Ebay Site identifier - int
  • Name - name of category - string
  • CategoryLevel - level from root - int
  • IsExpired - true if category is expired on eBay's side - boolean
  • IsLeaf - true if category has no sub categories - boolean
  • IsVirtual - true if category is virtual - boolean
  • AttributeSetID - attributeset id of category - int
  • UseSiteConditionAttributeSetID - true if global sets are valid for Condition - boolean
  • UseSiteReturnPolicyAttributeSetID - true if global sets are valid for ReturnPolicy - boolean

getInfoEbayCategory

Returns the EbayCategory by identifier.

Syntax
$hEbayCategory = $EbayCategoryTree->getInfoEbayCategory($EbayCategoryID);
Input
$EbayCategoryID (int)
internal CategoryID (not the eBay Category Id) (primary key)
Return
$hEbayCategory (reference to hash)
with following keys:
  • EbayCategoryID - internal category id - int
  • ExternalCategoryId - external category Id - numeric(20)
  • ParentCategoryID - internal parent category id (optional)- int
  • EbaySiteID - Ebay Site identifier - int
  • Name - name of category - nvarchar(255)
  • CategoryLevel - level from root - int
  • IsExpired - true if category is expired on eBay's side - boolean
  • IsLeaf - true if category has no sub categories - boolean
  • IsVirtual - true if category is virtual - boolean
  • AttributeSetID - attributeset id of category - int
  • UseSiteConditionAttributeSetID - true if global sets are valid for Condition - boolean
  • UseSiteReturnPolicyAttributeSetID - true if global sets are valid for ReturnPolicy - boolean

getInfoEbayCategoryByExternalCategoryId

Returns the eBay category by external category id. If no eBay category exists for the given external category id then "undef" is returned.

Syntax
$hEbayCategory = $EbayCategoryTree->getInfoEbayCategoryByExternalCategoryId($ExternalCategoryId);
Input
$ExternalCategoryId (numeric(20))
eBay's Category Id
Return
$hEbayCategory (reference to hash)
with following keys:
  • EbayCategoryID - internal category id - int
  • ExternalCategoryId - external category Id - numeric(20)
  • ParentCategoryID - internal parent category id (optional)- int
  • EbaySiteID - Ebay Site identifier - int
  • Name - name of category - nvarchar(255)
  • CategoryLevel - level from root - int
  • IsExpired - true if category is expired on eBay's side - boolean
  • IsLeaf - true if category has no sub categories - boolean
  • IsVirtual - true if category is virtual - boolean
  • AttributeSetID - attributeset id of category - int
  • UseSiteConditionAttributeSetID - true if global sets are valid for Condition - boolean
  • UseSiteReturnPolicyAttributeSetID - true if global sets are valid for ReturnPolicy - boolean

getInfoRootCategories

Returns all eBay root categories.

Syntax
my $ahCategories = $EbayCategoryTree->getInfoRootCategories();
Return
$ahCategories (ref.array.hash)
with following keys:
  • CategoryLevel - level of category in tree - int
  • EbayCategoryID - internal category id - int
  • ExternalCategoryId - external eBay category id - numeric(20)
  • IsExpired - true if category is expired on eBay's side - boolean
  • IsLeaf - true if category has no sub categories - boolean
  • IsVirtual - true if category is virtual - boolean
  • Name - category name - string
  • ParentCategoryID - identifier of the parent category - int
  • AttributeSetID - attributeset id of category - int
  • UseSiteConditionAttributeSetID - true if global sets are valid for Condition - boolean
  • UseSiteReturnPolicyAttributeSetID - true if global sets are valid for ReturnPolicy - boolean

getPKeyEbayCategoryByExternalCategoryId

Returns primary key of EbayCategory by ExternalCategoryId. (generated function GetPKeyEbayCategoryByEbaySiteID).

Syntax
$EbayCategoryID = $EbayCategoryTree->getPKeyEbayCategoryByExternalCategoryId($ExternalCategoryId);
Input
$ExternalCategoryId (numeric(20))
eBay's Category Id
Return
$EbayCategoryID (int)
internal CategoryID (not the eBay Category Id) (primary key)

getUnusedAttributeSetIDs

Returns all unused AttributeSet IDs for a Site .

Syntax
my $aAllAttributeSetIDs = $EbayCategoryTree->getUnusedAttributeSetIDs();
Return
$aAllUnusedAttributeSetIDs (ref.array)
all unused AttributeSet IDs

new

Connects to the EbayCategory database.

Syntax
$EbayCategoryTree = DE_EPAGES::Ebay::API::Object::EbayCategoryTree->new;
Return
$EbayCategoryDB (object)
EbayCategoryDB object

setAttributeSystemVersion

Sets Attribute AttributeSystemVersion.

Syntax
$EbayCategoryTree->setAttributeSystemVersion(1234);
Input
$AttributeSystemVersion (Integer)
attribute system version

setCategoryListCount

Sets Attribute CategoryListCount.

Syntax
$EbayCategoryTree->setCategoryListCount(0);
Input
$CategoryListCount (Integer)
current list count

setCategoryListIsUpdating

Sets Attribute CategoryListIsUpdating true if parameter "1" is passed on to the function.

Syntax
$EbayCategoryTree->setCategoryListIsUpdating(1);
Input
$CategoryListIsUpdating (Boolean)
true if update is in process

setCategoryListUpdateTime

Sets CategoryListUpdateTime.

Syntax
$EbayCategoryTree->setCategoryListUpdateTime(DateTime->now());
Input
$CategoryListUpdateTime (DateTime)
time of update

update

Updates category list from eBay.

Syntax
$EbayCategoryTree->update( $printOutput );
Input
$printOutput (boolean)
print output to console
Return
$hResult (reference to hash)
category list information, e.g. version, count with following keys:
  • CategoryVersion - current eBay category list version - int
  • CategoryCount - total count of categories - numeric(20)
  • UpdateTime - date of last update of eBay's category list
    (on eBay side) (optional)- datetime

updateCSMappings

get new CategorySet mappings from ebay and update table ebaycategory

Syntax
$EbayCategoryTree->updateCSMappings();
Input
$printOutput (boolean)
print output to console