TbkDgMaterialOptionalRequest.php 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626
  1. <?php
  2. /**
  3. * TOP API: taobao.tbk.dg.material.optional request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2020.12.02
  7. */
  8. class TbkDgMaterialOptionalRequest
  9. {
  10. /**
  11. * mm_xxx_xxx_12345678三段式的最后一段数字
  12. **/
  13. private $adzoneId;
  14. /**
  15. * 商品筛选-后台类目ID。用,分割,最大10个,该ID可以通过taobao.itemcats.get接口获取到
  16. **/
  17. private $cat;
  18. /**
  19. * 本地化业务入参-LBS信息-国标城市码,仅支持单个请求,请求饿了么卡券物料时,该字段必填。 (详细城市ID见:https://mo.m.taobao.com/page_2020010315120200508)
  20. **/
  21. private $cityCode;
  22. /**
  23. * 智能匹配-设备号加密类型:MD5
  24. **/
  25. private $deviceEncrypt;
  26. /**
  27. * 智能匹配-设备号类型:IMEI,或者IDFA,或者UTDID(UTDID不支持MD5加密),或者OAID
  28. **/
  29. private $deviceType;
  30. /**
  31. * 智能匹配-设备号加密后的值(MD5加密需32位小写)
  32. **/
  33. private $deviceValue;
  34. /**
  35. * 商品筛选-KA媒体淘客佣金比率上限。如:1234表示12.34%
  36. **/
  37. private $endKaTkRate;
  38. /**
  39. * 商品筛选-折扣价范围上限。单位:元
  40. **/
  41. private $endPrice;
  42. /**
  43. * 商品筛选-淘客佣金比率上限。如:1234表示12.34%
  44. **/
  45. private $endTkRate;
  46. /**
  47. * 优惠券筛选-是否有优惠券。true表示该商品有优惠券,false或不设置表示不限
  48. **/
  49. private $hasCoupon;
  50. /**
  51. * 商品筛选-好评率是否高于行业均值。True表示大于等于,false或不设置表示不限
  52. **/
  53. private $includeGoodRate;
  54. /**
  55. * 商品筛选(特定媒体支持)-成交转化是否高于行业均值。True表示大于等于,false或不设置表示不限
  56. **/
  57. private $includePayRate30;
  58. /**
  59. * 商品筛选(特定媒体支持)-退款率是否低于行业均值。True表示大于等于,false或不设置表示不限
  60. **/
  61. private $includeRfdRate;
  62. /**
  63. * ip参数影响邮费获取,如果不传或者传入不准确,邮费无法精准提供
  64. **/
  65. private $ip;
  66. /**
  67. * 商品筛选-是否海外商品。true表示属于海外商品,false或不设置表示不限
  68. **/
  69. private $isOverseas;
  70. /**
  71. * 商品筛选-是否天猫商品。true表示属于天猫商品,false或不设置表示不限
  72. **/
  73. private $isTmall;
  74. /**
  75. * 商品筛选-所在地
  76. **/
  77. private $itemloc;
  78. /**
  79. * 本地化业务入参-LBS信息-纬度
  80. **/
  81. private $latitude;
  82. /**
  83. * 锁佣结束时间
  84. **/
  85. private $lockRateEndTime;
  86. /**
  87. * 锁佣开始时间
  88. **/
  89. private $lockRateStartTime;
  90. /**
  91. * 本地化业务入参-LBS信息-经度
  92. **/
  93. private $longitude;
  94. /**
  95. * 不传时默认物料id=2836;如果直接对消费者投放,可使用官方个性化算法优化的搜索物料id=17004
  96. **/
  97. private $materialId;
  98. /**
  99. * 商品筛选-是否包邮。true表示包邮,false或不设置表示不限
  100. **/
  101. private $needFreeShipment;
  102. /**
  103. * 商品筛选-是否加入消费者保障。true表示加入,false或不设置表示不限
  104. **/
  105. private $needPrepay;
  106. /**
  107. * 商品筛选-牛皮癣程度。取值:1不限,2无,3轻微
  108. **/
  109. private $npxLevel;
  110. /**
  111. * 第几页,默认:1
  112. **/
  113. private $pageNo;
  114. /**
  115. * 页大小,默认20,1~100
  116. **/
  117. private $pageSize;
  118. /**
  119. * 链接形式:1:PC,2:无线,默认:1
  120. **/
  121. private $platform;
  122. /**
  123. * 商品筛选-查询词
  124. **/
  125. private $q;
  126. /**
  127. * 渠道关系ID,仅适用于渠道推广场景
  128. **/
  129. private $relationId;
  130. /**
  131. * 商家id,仅支持饿了么卡券商家ID,支持批量请求1-100以内,多个商家ID使用英文逗号分隔
  132. **/
  133. private $sellerIds;
  134. /**
  135. * 排序_des(降序),排序_asc(升序),销量(total_sales),淘客佣金比率(tk_rate), 累计推广量(tk_total_sales),总支出佣金(tk_total_commi),价格(price)
  136. **/
  137. private $sort;
  138. /**
  139. * 会员运营ID
  140. **/
  141. private $specialId;
  142. /**
  143. * 商品筛选(特定媒体支持)-店铺dsr评分。筛选大于等于当前设置的店铺dsr评分的商品0-50000之间
  144. **/
  145. private $startDsr;
  146. /**
  147. * 商品筛选-KA媒体淘客佣金比率下限。如:1234表示12.34%
  148. **/
  149. private $startKaTkRate;
  150. /**
  151. * 商品筛选-折扣价范围下限。单位:元
  152. **/
  153. private $startPrice;
  154. /**
  155. * 商品筛选-淘客佣金比率下限。如:1234表示12.34%
  156. **/
  157. private $startTkRate;
  158. private $apiParas = array();
  159. public function setAdzoneId($adzoneId)
  160. {
  161. $this->adzoneId = $adzoneId;
  162. $this->apiParas["adzone_id"] = $adzoneId;
  163. }
  164. public function getAdzoneId()
  165. {
  166. return $this->adzoneId;
  167. }
  168. public function setCat($cat)
  169. {
  170. $this->cat = $cat;
  171. $this->apiParas["cat"] = $cat;
  172. }
  173. public function getCat()
  174. {
  175. return $this->cat;
  176. }
  177. public function setCityCode($cityCode)
  178. {
  179. $this->cityCode = $cityCode;
  180. $this->apiParas["city_code"] = $cityCode;
  181. }
  182. public function getCityCode()
  183. {
  184. return $this->cityCode;
  185. }
  186. public function setDeviceEncrypt($deviceEncrypt)
  187. {
  188. $this->deviceEncrypt = $deviceEncrypt;
  189. $this->apiParas["device_encrypt"] = $deviceEncrypt;
  190. }
  191. public function getDeviceEncrypt()
  192. {
  193. return $this->deviceEncrypt;
  194. }
  195. public function setDeviceType($deviceType)
  196. {
  197. $this->deviceType = $deviceType;
  198. $this->apiParas["device_type"] = $deviceType;
  199. }
  200. public function getDeviceType()
  201. {
  202. return $this->deviceType;
  203. }
  204. public function setDeviceValue($deviceValue)
  205. {
  206. $this->deviceValue = $deviceValue;
  207. $this->apiParas["device_value"] = $deviceValue;
  208. }
  209. public function getDeviceValue()
  210. {
  211. return $this->deviceValue;
  212. }
  213. public function setEndKaTkRate($endKaTkRate)
  214. {
  215. $this->endKaTkRate = $endKaTkRate;
  216. $this->apiParas["end_ka_tk_rate"] = $endKaTkRate;
  217. }
  218. public function getEndKaTkRate()
  219. {
  220. return $this->endKaTkRate;
  221. }
  222. public function setEndPrice($endPrice)
  223. {
  224. $this->endPrice = $endPrice;
  225. $this->apiParas["end_price"] = $endPrice;
  226. }
  227. public function getEndPrice()
  228. {
  229. return $this->endPrice;
  230. }
  231. public function setEndTkRate($endTkRate)
  232. {
  233. $this->endTkRate = $endTkRate;
  234. $this->apiParas["end_tk_rate"] = $endTkRate;
  235. }
  236. public function getEndTkRate()
  237. {
  238. return $this->endTkRate;
  239. }
  240. public function setHasCoupon($hasCoupon)
  241. {
  242. $this->hasCoupon = $hasCoupon;
  243. $this->apiParas["has_coupon"] = $hasCoupon;
  244. }
  245. public function getHasCoupon()
  246. {
  247. return $this->hasCoupon;
  248. }
  249. public function setIncludeGoodRate($includeGoodRate)
  250. {
  251. $this->includeGoodRate = $includeGoodRate;
  252. $this->apiParas["include_good_rate"] = $includeGoodRate;
  253. }
  254. public function getIncludeGoodRate()
  255. {
  256. return $this->includeGoodRate;
  257. }
  258. public function setIncludePayRate30($includePayRate30)
  259. {
  260. $this->includePayRate30 = $includePayRate30;
  261. $this->apiParas["include_pay_rate_30"] = $includePayRate30;
  262. }
  263. public function getIncludePayRate30()
  264. {
  265. return $this->includePayRate30;
  266. }
  267. public function setIncludeRfdRate($includeRfdRate)
  268. {
  269. $this->includeRfdRate = $includeRfdRate;
  270. $this->apiParas["include_rfd_rate"] = $includeRfdRate;
  271. }
  272. public function getIncludeRfdRate()
  273. {
  274. return $this->includeRfdRate;
  275. }
  276. public function setIp($ip)
  277. {
  278. $this->ip = $ip;
  279. $this->apiParas["ip"] = $ip;
  280. }
  281. public function getIp()
  282. {
  283. return $this->ip;
  284. }
  285. public function setIsOverseas($isOverseas)
  286. {
  287. $this->isOverseas = $isOverseas;
  288. $this->apiParas["is_overseas"] = $isOverseas;
  289. }
  290. public function getIsOverseas()
  291. {
  292. return $this->isOverseas;
  293. }
  294. public function setIsTmall($isTmall)
  295. {
  296. $this->isTmall = $isTmall;
  297. $this->apiParas["is_tmall"] = $isTmall;
  298. }
  299. public function getIsTmall()
  300. {
  301. return $this->isTmall;
  302. }
  303. public function setItemloc($itemloc)
  304. {
  305. $this->itemloc = $itemloc;
  306. $this->apiParas["itemloc"] = $itemloc;
  307. }
  308. public function getItemloc()
  309. {
  310. return $this->itemloc;
  311. }
  312. public function setLatitude($latitude)
  313. {
  314. $this->latitude = $latitude;
  315. $this->apiParas["latitude"] = $latitude;
  316. }
  317. public function getLatitude()
  318. {
  319. return $this->latitude;
  320. }
  321. public function setLockRateEndTime($lockRateEndTime)
  322. {
  323. $this->lockRateEndTime = $lockRateEndTime;
  324. $this->apiParas["lock_rate_end_time"] = $lockRateEndTime;
  325. }
  326. public function getLockRateEndTime()
  327. {
  328. return $this->lockRateEndTime;
  329. }
  330. public function setLockRateStartTime($lockRateStartTime)
  331. {
  332. $this->lockRateStartTime = $lockRateStartTime;
  333. $this->apiParas["lock_rate_start_time"] = $lockRateStartTime;
  334. }
  335. public function getLockRateStartTime()
  336. {
  337. return $this->lockRateStartTime;
  338. }
  339. public function setLongitude($longitude)
  340. {
  341. $this->longitude = $longitude;
  342. $this->apiParas["longitude"] = $longitude;
  343. }
  344. public function getLongitude()
  345. {
  346. return $this->longitude;
  347. }
  348. public function setMaterialId($materialId)
  349. {
  350. $this->materialId = $materialId;
  351. $this->apiParas["material_id"] = $materialId;
  352. }
  353. public function getMaterialId()
  354. {
  355. return $this->materialId;
  356. }
  357. public function setNeedFreeShipment($needFreeShipment)
  358. {
  359. $this->needFreeShipment = $needFreeShipment;
  360. $this->apiParas["need_free_shipment"] = $needFreeShipment;
  361. }
  362. public function getNeedFreeShipment()
  363. {
  364. return $this->needFreeShipment;
  365. }
  366. public function setNeedPrepay($needPrepay)
  367. {
  368. $this->needPrepay = $needPrepay;
  369. $this->apiParas["need_prepay"] = $needPrepay;
  370. }
  371. public function getNeedPrepay()
  372. {
  373. return $this->needPrepay;
  374. }
  375. public function setNpxLevel($npxLevel)
  376. {
  377. $this->npxLevel = $npxLevel;
  378. $this->apiParas["npx_level"] = $npxLevel;
  379. }
  380. public function getNpxLevel()
  381. {
  382. return $this->npxLevel;
  383. }
  384. public function setPageNo($pageNo)
  385. {
  386. $this->pageNo = $pageNo;
  387. $this->apiParas["page_no"] = $pageNo;
  388. }
  389. public function getPageNo()
  390. {
  391. return $this->pageNo;
  392. }
  393. public function setPageSize($pageSize)
  394. {
  395. $this->pageSize = $pageSize;
  396. $this->apiParas["page_size"] = $pageSize;
  397. }
  398. public function getPageSize()
  399. {
  400. return $this->pageSize;
  401. }
  402. public function setPlatform($platform)
  403. {
  404. $this->platform = $platform;
  405. $this->apiParas["platform"] = $platform;
  406. }
  407. public function getPlatform()
  408. {
  409. return $this->platform;
  410. }
  411. public function setQ($q)
  412. {
  413. $this->q = $q;
  414. $this->apiParas["q"] = $q;
  415. }
  416. public function getQ()
  417. {
  418. return $this->q;
  419. }
  420. public function setRelationId($relationId)
  421. {
  422. $this->relationId = $relationId;
  423. $this->apiParas["relation_id"] = $relationId;
  424. }
  425. public function getRelationId()
  426. {
  427. return $this->relationId;
  428. }
  429. public function setSellerIds($sellerIds)
  430. {
  431. $this->sellerIds = $sellerIds;
  432. $this->apiParas["seller_ids"] = $sellerIds;
  433. }
  434. public function getSellerIds()
  435. {
  436. return $this->sellerIds;
  437. }
  438. public function setSort($sort)
  439. {
  440. $this->sort = $sort;
  441. $this->apiParas["sort"] = $sort;
  442. }
  443. public function getSort()
  444. {
  445. return $this->sort;
  446. }
  447. public function setSpecialId($specialId)
  448. {
  449. $this->specialId = $specialId;
  450. $this->apiParas["special_id"] = $specialId;
  451. }
  452. public function getSpecialId()
  453. {
  454. return $this->specialId;
  455. }
  456. public function setStartDsr($startDsr)
  457. {
  458. $this->startDsr = $startDsr;
  459. $this->apiParas["start_dsr"] = $startDsr;
  460. }
  461. public function getStartDsr()
  462. {
  463. return $this->startDsr;
  464. }
  465. public function setStartKaTkRate($startKaTkRate)
  466. {
  467. $this->startKaTkRate = $startKaTkRate;
  468. $this->apiParas["start_ka_tk_rate"] = $startKaTkRate;
  469. }
  470. public function getStartKaTkRate()
  471. {
  472. return $this->startKaTkRate;
  473. }
  474. public function setStartPrice($startPrice)
  475. {
  476. $this->startPrice = $startPrice;
  477. $this->apiParas["start_price"] = $startPrice;
  478. }
  479. public function getStartPrice()
  480. {
  481. return $this->startPrice;
  482. }
  483. public function setStartTkRate($startTkRate)
  484. {
  485. $this->startTkRate = $startTkRate;
  486. $this->apiParas["start_tk_rate"] = $startTkRate;
  487. }
  488. public function getStartTkRate()
  489. {
  490. return $this->startTkRate;
  491. }
  492. public function getApiMethodName()
  493. {
  494. return "taobao.tbk.dg.material.optional";
  495. }
  496. public function getApiParas()
  497. {
  498. return $this->apiParas;
  499. }
  500. public function check()
  501. {
  502. RequestCheckUtil::checkNotNull($this->adzoneId,"adzoneId");
  503. RequestCheckUtil::checkMaxValue($this->startDsr,50000,"startDsr");
  504. }
  505. public function putOtherTextParam($key, $value) {
  506. $this->apiParas[$key] = $value;
  507. $this->$key = $value;
  508. }
  509. }