Nav apraksta

TbkDgMaterialOptionalRequest.php 5.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290
  1. <?php
  2. /**
  3. * TOP API: taobao.tbk.dg.material.optional request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2018.04.02
  7. */
  8. class TbkDgMaterialOptionalRequest
  9. {
  10. /**
  11. * mm_xxx_xxx_xxx的第三位
  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. * 排序_des(降序),排序_asc(升序),销量(total_sales),淘客佣金比率(tk_rate), 累计推广量(tk_total_sales),总支出佣金(tk_total_commi),价格(price)
  60. **/
  61. private $sort;
  62. /**
  63. * 店铺dsr评分,筛选高于等于当前设置的店铺dsr评分的商品0-50000之间
  64. **/
  65. private $startDsr;
  66. /**
  67. * 折扣价范围下限,单位:元
  68. **/
  69. private $startPrice;
  70. /**
  71. * 淘客佣金比率下限,如:1234表示12.34%
  72. **/
  73. private $startTkRate;
  74. private $apiParas = array();
  75. public function setAdzoneId($adzoneId)
  76. {
  77. $this->adzoneId = $adzoneId;
  78. $this->apiParas["adzone_id"] = $adzoneId;
  79. }
  80. public function getAdzoneId()
  81. {
  82. return $this->adzoneId;
  83. }
  84. public function setCat($cat)
  85. {
  86. $this->cat = $cat;
  87. $this->apiParas["cat"] = $cat;
  88. }
  89. public function getCat()
  90. {
  91. return $this->cat;
  92. }
  93. public function setEndPrice($endPrice)
  94. {
  95. $this->endPrice = $endPrice;
  96. $this->apiParas["end_price"] = $endPrice;
  97. }
  98. public function getEndPrice()
  99. {
  100. return $this->endPrice;
  101. }
  102. public function setEndTkRate($endTkRate)
  103. {
  104. $this->endTkRate = $endTkRate;
  105. $this->apiParas["end_tk_rate"] = $endTkRate;
  106. }
  107. public function getEndTkRate()
  108. {
  109. return $this->endTkRate;
  110. }
  111. public function setHasCoupon($hasCoupon)
  112. {
  113. $this->hasCoupon = $hasCoupon;
  114. $this->apiParas["has_coupon"] = $hasCoupon;
  115. }
  116. public function getHasCoupon()
  117. {
  118. return $this->hasCoupon;
  119. }
  120. public function setIsOverseas($isOverseas)
  121. {
  122. $this->isOverseas = $isOverseas;
  123. $this->apiParas["is_overseas"] = $isOverseas;
  124. }
  125. public function getIsOverseas()
  126. {
  127. return $this->isOverseas;
  128. }
  129. public function setIsTmall($isTmall)
  130. {
  131. $this->isTmall = $isTmall;
  132. $this->apiParas["is_tmall"] = $isTmall;
  133. }
  134. public function getIsTmall()
  135. {
  136. return $this->isTmall;
  137. }
  138. public function setItemloc($itemloc)
  139. {
  140. $this->itemloc = $itemloc;
  141. $this->apiParas["itemloc"] = $itemloc;
  142. }
  143. public function getItemloc()
  144. {
  145. return $this->itemloc;
  146. }
  147. public function setPageNo($pageNo)
  148. {
  149. $this->pageNo = $pageNo;
  150. $this->apiParas["page_no"] = $pageNo;
  151. }
  152. public function getPageNo()
  153. {
  154. return $this->pageNo;
  155. }
  156. public function setPageSize($pageSize)
  157. {
  158. $this->pageSize = $pageSize;
  159. $this->apiParas["page_size"] = $pageSize;
  160. }
  161. public function getPageSize()
  162. {
  163. return $this->pageSize;
  164. }
  165. public function setPlatform($platform)
  166. {
  167. $this->platform = $platform;
  168. $this->apiParas["platform"] = $platform;
  169. }
  170. public function getPlatform()
  171. {
  172. return $this->platform;
  173. }
  174. public function setQ($q)
  175. {
  176. $this->q = $q;
  177. $this->apiParas["q"] = $q;
  178. }
  179. public function getQ()
  180. {
  181. return $this->q;
  182. }
  183. public function setSort($sort)
  184. {
  185. $this->sort = $sort;
  186. $this->apiParas["sort"] = $sort;
  187. }
  188. public function getSort()
  189. {
  190. return $this->sort;
  191. }
  192. public function setStartDsr($startDsr)
  193. {
  194. $this->startDsr = $startDsr;
  195. $this->apiParas["start_dsr"] = $startDsr;
  196. }
  197. public function getStartDsr()
  198. {
  199. return $this->startDsr;
  200. }
  201. public function setStartPrice($startPrice)
  202. {
  203. $this->startPrice = $startPrice;
  204. $this->apiParas["start_price"] = $startPrice;
  205. }
  206. public function getStartPrice()
  207. {
  208. return $this->startPrice;
  209. }
  210. public function setStartTkRate($startTkRate)
  211. {
  212. $this->startTkRate = $startTkRate;
  213. $this->apiParas["start_tk_rate"] = $startTkRate;
  214. }
  215. public function getStartTkRate()
  216. {
  217. return $this->startTkRate;
  218. }
  219. public function getApiMethodName()
  220. {
  221. return "taobao.tbk.dg.material.optional";
  222. }
  223. public function getApiParas()
  224. {
  225. return $this->apiParas;
  226. }
  227. public function check()
  228. {
  229. RequestCheckUtil::checkNotNull($this->adzoneId,"adzoneId");
  230. RequestCheckUtil::checkMaxValue($this->startDsr,50000,"startDsr");
  231. }
  232. public function putOtherTextParam($key, $value) {
  233. $this->apiParas[$key] = $value;
  234. $this->$key = $value;
  235. }
  236. }