Geen omschrijving

TbkScMaterialOptionalRequest.php 5.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307
  1. <?php
  2. /**
  3. * TOP API: taobao.tbk.sc.material.optional request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2018.04.02
  7. */
  8. class TbkScMaterialOptionalRequest
  9. {
  10. /**
  11. * adzone_id
  12. **/
  13. private $adzoneId;
  14. /**
  15. * 后台类目ID,用,分割,最大10个,该ID可以通过taobao.itemcats.get接口获取到
  16. **/
  17. private $cat;
  18. /**
  19. * 折扣价范围上限,单位:元
  20. **/
  21. private $endPrice;
  22. /**
  23. * 淘客佣金比率上限,如:1234表示12.34%
  24. **/
  25. private $endTkRate;
  26. /**
  27. * 是否有优惠券,设置为true表示该商品有优惠券,设置为false或不设置表示不判断这个属性
  28. **/
  29. private $hasCoupon;
  30. /**
  31. * 是否海外商品,设置为true表示该商品是属于海外商品,设置为false或不设置表示不判断这个属性
  32. **/
  33. private $isOverseas;
  34. /**
  35. * 是否商城商品,设置为true表示该商品是属于淘宝商城商品,设置为false或不设置表示不判断这个属性
  36. **/
  37. private $isTmall;
  38. /**
  39. * 所在地
  40. **/
  41. private $itemloc;
  42. /**
  43. * 第几页,默认:1
  44. **/
  45. private $pageNo;
  46. /**
  47. * 页大小,默认20,1~100
  48. **/
  49. private $pageSize;
  50. /**
  51. * 链接形式:1:PC,2:无线,默认:1
  52. **/
  53. private $platform;
  54. /**
  55. * 查询词
  56. **/
  57. private $q;
  58. /**
  59. * site_id
  60. **/
  61. private $siteId;
  62. /**
  63. * 排序_des(降序),排序_asc(升序),销量(total_sales),淘客佣金比率(tk_rate), 累计推广量(tk_total_sales),总支出佣金(tk_total_commi),价格(price)
  64. **/
  65. private $sort;
  66. /**
  67. * 店铺dsr评分,筛选高于等于当前设置的店铺dsr评分的商品0-50000之间
  68. **/
  69. private $startDsr;
  70. /**
  71. * 折扣价范围下限,单位:元
  72. **/
  73. private $startPrice;
  74. /**
  75. * 淘客佣金比率下限,如:1234表示12.34%
  76. **/
  77. private $startTkRate;
  78. private $apiParas = array();
  79. public function setAdzoneId($adzoneId)
  80. {
  81. $this->adzoneId = $adzoneId;
  82. $this->apiParas["adzone_id"] = $adzoneId;
  83. }
  84. public function getAdzoneId()
  85. {
  86. return $this->adzoneId;
  87. }
  88. public function setCat($cat)
  89. {
  90. $this->cat = $cat;
  91. $this->apiParas["cat"] = $cat;
  92. }
  93. public function getCat()
  94. {
  95. return $this->cat;
  96. }
  97. public function setEndPrice($endPrice)
  98. {
  99. $this->endPrice = $endPrice;
  100. $this->apiParas["end_price"] = $endPrice;
  101. }
  102. public function getEndPrice()
  103. {
  104. return $this->endPrice;
  105. }
  106. public function setEndTkRate($endTkRate)
  107. {
  108. $this->endTkRate = $endTkRate;
  109. $this->apiParas["end_tk_rate"] = $endTkRate;
  110. }
  111. public function getEndTkRate()
  112. {
  113. return $this->endTkRate;
  114. }
  115. public function setHasCoupon($hasCoupon)
  116. {
  117. $this->hasCoupon = $hasCoupon;
  118. $this->apiParas["has_coupon"] = $hasCoupon;
  119. }
  120. public function getHasCoupon()
  121. {
  122. return $this->hasCoupon;
  123. }
  124. public function setIsOverseas($isOverseas)
  125. {
  126. $this->isOverseas = $isOverseas;
  127. $this->apiParas["is_overseas"] = $isOverseas;
  128. }
  129. public function getIsOverseas()
  130. {
  131. return $this->isOverseas;
  132. }
  133. public function setIsTmall($isTmall)
  134. {
  135. $this->isTmall = $isTmall;
  136. $this->apiParas["is_tmall"] = $isTmall;
  137. }
  138. public function getIsTmall()
  139. {
  140. return $this->isTmall;
  141. }
  142. public function setItemloc($itemloc)
  143. {
  144. $this->itemloc = $itemloc;
  145. $this->apiParas["itemloc"] = $itemloc;
  146. }
  147. public function getItemloc()
  148. {
  149. return $this->itemloc;
  150. }
  151. public function setPageNo($pageNo)
  152. {
  153. $this->pageNo = $pageNo;
  154. $this->apiParas["page_no"] = $pageNo;
  155. }
  156. public function getPageNo()
  157. {
  158. return $this->pageNo;
  159. }
  160. public function setPageSize($pageSize)
  161. {
  162. $this->pageSize = $pageSize;
  163. $this->apiParas["page_size"] = $pageSize;
  164. }
  165. public function getPageSize()
  166. {
  167. return $this->pageSize;
  168. }
  169. public function setPlatform($platform)
  170. {
  171. $this->platform = $platform;
  172. $this->apiParas["platform"] = $platform;
  173. }
  174. public function getPlatform()
  175. {
  176. return $this->platform;
  177. }
  178. public function setQ($q)
  179. {
  180. $this->q = $q;
  181. $this->apiParas["q"] = $q;
  182. }
  183. public function getQ()
  184. {
  185. return $this->q;
  186. }
  187. public function setSiteId($siteId)
  188. {
  189. $this->siteId = $siteId;
  190. $this->apiParas["site_id"] = $siteId;
  191. }
  192. public function getSiteId()
  193. {
  194. return $this->siteId;
  195. }
  196. public function setSort($sort)
  197. {
  198. $this->sort = $sort;
  199. $this->apiParas["sort"] = $sort;
  200. }
  201. public function getSort()
  202. {
  203. return $this->sort;
  204. }
  205. public function setStartDsr($startDsr)
  206. {
  207. $this->startDsr = $startDsr;
  208. $this->apiParas["start_dsr"] = $startDsr;
  209. }
  210. public function getStartDsr()
  211. {
  212. return $this->startDsr;
  213. }
  214. public function setStartPrice($startPrice)
  215. {
  216. $this->startPrice = $startPrice;
  217. $this->apiParas["start_price"] = $startPrice;
  218. }
  219. public function getStartPrice()
  220. {
  221. return $this->startPrice;
  222. }
  223. public function setStartTkRate($startTkRate)
  224. {
  225. $this->startTkRate = $startTkRate;
  226. $this->apiParas["start_tk_rate"] = $startTkRate;
  227. }
  228. public function getStartTkRate()
  229. {
  230. return $this->startTkRate;
  231. }
  232. public function getApiMethodName()
  233. {
  234. return "taobao.tbk.sc.material.optional";
  235. }
  236. public function getApiParas()
  237. {
  238. return $this->apiParas;
  239. }
  240. public function check()
  241. {
  242. RequestCheckUtil::checkNotNull($this->adzoneId,"adzoneId");
  243. RequestCheckUtil::checkNotNull($this->siteId,"siteId");
  244. RequestCheckUtil::checkMaxValue($this->startDsr,50000,"startDsr");
  245. }
  246. public function putOtherTextParam($key, $value) {
  247. $this->apiParas[$key] = $value;
  248. $this->$key = $value;
  249. }
  250. }