REAPI/extend/sdk/taobao/top/request/ItemcatsGetRequest.php

98 lines
2.2 KiB
PHP
Raw Normal View History

2024-09-29 15:43:18 +08:00
<?php
/**
* TOP API: taobao.itemcats.get request
*
* @author auto create
* @since 1.0, 2022.05.31
*/
class ItemcatsGetRequest
{
/**
* 商品所属类目ID列表用半角逗号(,)分隔 例如:(18957,19562,) (cids、parent_cid至少传一个)
**/
private $cids;
/**
* 无效字段,暂无法使用。时间戳(格式:yyyy-MM-dd HH:mm:ss如果该字段没有传则取当前所有的类目信息,如果传了parent_cid或者cids则忽略datetime如果该字段传了那么可以查询到该时间到现在为止的增量变化
**/
private $datetime;
/**
* 需要返回的字段列表见ItemCat默认返回cid,parent_cid,name,is_parent增量类目信息,根据fields传入的参数返回相应的结果。 features字段 1、如果存在attr_key=freeze表示该类目被冻结了attr_value=0,5value可能存在2个值也可能只有1个用逗号分割0表示禁编辑5表示禁止发布
**/
private $fields;
/**
* 父商品类目 id0表示根节点, 传输该参数返回所有子类目。 (cids、parent_cid至少传一个)
**/
private $parentCid;
private $apiParas = array();
public function setCids($cids)
{
$this->cids = $cids;
$this->apiParas["cids"] = $cids;
}
public function getCids()
{
return $this->cids;
}
public function setDatetime($datetime)
{
$this->datetime = $datetime;
$this->apiParas["datetime"] = $datetime;
}
public function getDatetime()
{
return $this->datetime;
}
public function setFields($fields)
{
$this->fields = $fields;
$this->apiParas["fields"] = $fields;
}
public function getFields()
{
return $this->fields;
}
public function setParentCid($parentCid)
{
$this->parentCid = $parentCid;
$this->apiParas["parent_cid"] = $parentCid;
}
public function getParentCid()
{
return $this->parentCid;
}
public function getApiMethodName()
{
return "taobao.itemcats.get";
}
public function getApiParas()
{
return $this->apiParas;
}
public function check()
{
RequestCheckUtil::checkMaxListSize($this->cids,999,"cids");
RequestCheckUtil::checkMaxListSize($this->fields,999,"fields");
}
public function putOtherTextParam($key, $value) {
$this->apiParas[$key] = $value;
$this->$key = $value;
}
}