优惠券订单及其他脚本

TbkShopGetRequest.php 4.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  1. <?php
  2. /**
  3. * TOP API: taobao.tbk.shop.get request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2018.07.25
  7. */
  8. class TbkShopGetRequest
  9. {
  10. /**
  11. * 累计推广商品上限
  12. **/
  13. private $endAuctionCount;
  14. /**
  15. * 淘客佣金比率上限,1~10000
  16. **/
  17. private $endCommissionRate;
  18. /**
  19. * 信用等级上限,1~20
  20. **/
  21. private $endCredit;
  22. /**
  23. * 店铺商品总数上限
  24. **/
  25. private $endTotalAction;
  26. /**
  27. * 需返回的字段列表
  28. **/
  29. private $fields;
  30. /**
  31. * 是否商城的店铺,设置为true表示该是属于淘宝商城的店铺,设置为false或不设置表示不判断这个属性
  32. **/
  33. private $isTmall;
  34. /**
  35. * 第几页,默认1,1~100
  36. **/
  37. private $pageNo;
  38. /**
  39. * 页大小,默认20,1~100
  40. **/
  41. private $pageSize;
  42. /**
  43. * 链接形式:1:PC,2:无线,默认:1
  44. **/
  45. private $platform;
  46. /**
  47. * 查询词
  48. **/
  49. private $q;
  50. /**
  51. * 排序_des(降序),排序_asc(升序),佣金比率(commission_rate), 商品数量(auction_count),销售总数量(total_auction)
  52. **/
  53. private $sort;
  54. /**
  55. * 累计推广商品下限
  56. **/
  57. private $startAuctionCount;
  58. /**
  59. * 淘客佣金比率下限,1~10000
  60. **/
  61. private $startCommissionRate;
  62. /**
  63. * 信用等级下限,1~20
  64. **/
  65. private $startCredit;
  66. /**
  67. * 店铺商品总数下限
  68. **/
  69. private $startTotalAction;
  70. private $apiParas = array();
  71. public function setEndAuctionCount($endAuctionCount)
  72. {
  73. $this->endAuctionCount = $endAuctionCount;
  74. $this->apiParas["end_auction_count"] = $endAuctionCount;
  75. }
  76. public function getEndAuctionCount()
  77. {
  78. return $this->endAuctionCount;
  79. }
  80. public function setEndCommissionRate($endCommissionRate)
  81. {
  82. $this->endCommissionRate = $endCommissionRate;
  83. $this->apiParas["end_commission_rate"] = $endCommissionRate;
  84. }
  85. public function getEndCommissionRate()
  86. {
  87. return $this->endCommissionRate;
  88. }
  89. public function setEndCredit($endCredit)
  90. {
  91. $this->endCredit = $endCredit;
  92. $this->apiParas["end_credit"] = $endCredit;
  93. }
  94. public function getEndCredit()
  95. {
  96. return $this->endCredit;
  97. }
  98. public function setEndTotalAction($endTotalAction)
  99. {
  100. $this->endTotalAction = $endTotalAction;
  101. $this->apiParas["end_total_action"] = $endTotalAction;
  102. }
  103. public function getEndTotalAction()
  104. {
  105. return $this->endTotalAction;
  106. }
  107. public function setFields($fields)
  108. {
  109. $this->fields = $fields;
  110. $this->apiParas["fields"] = $fields;
  111. }
  112. public function getFields()
  113. {
  114. return $this->fields;
  115. }
  116. public function setIsTmall($isTmall)
  117. {
  118. $this->isTmall = $isTmall;
  119. $this->apiParas["is_tmall"] = $isTmall;
  120. }
  121. public function getIsTmall()
  122. {
  123. return $this->isTmall;
  124. }
  125. public function setPageNo($pageNo)
  126. {
  127. $this->pageNo = $pageNo;
  128. $this->apiParas["page_no"] = $pageNo;
  129. }
  130. public function getPageNo()
  131. {
  132. return $this->pageNo;
  133. }
  134. public function setPageSize($pageSize)
  135. {
  136. $this->pageSize = $pageSize;
  137. $this->apiParas["page_size"] = $pageSize;
  138. }
  139. public function getPageSize()
  140. {
  141. return $this->pageSize;
  142. }
  143. public function setPlatform($platform)
  144. {
  145. $this->platform = $platform;
  146. $this->apiParas["platform"] = $platform;
  147. }
  148. public function getPlatform()
  149. {
  150. return $this->platform;
  151. }
  152. public function setQ($q)
  153. {
  154. $this->q = $q;
  155. $this->apiParas["q"] = $q;
  156. }
  157. public function getQ()
  158. {
  159. return $this->q;
  160. }
  161. public function setSort($sort)
  162. {
  163. $this->sort = $sort;
  164. $this->apiParas["sort"] = $sort;
  165. }
  166. public function getSort()
  167. {
  168. return $this->sort;
  169. }
  170. public function setStartAuctionCount($startAuctionCount)
  171. {
  172. $this->startAuctionCount = $startAuctionCount;
  173. $this->apiParas["start_auction_count"] = $startAuctionCount;
  174. }
  175. public function getStartAuctionCount()
  176. {
  177. return $this->startAuctionCount;
  178. }
  179. public function setStartCommissionRate($startCommissionRate)
  180. {
  181. $this->startCommissionRate = $startCommissionRate;
  182. $this->apiParas["start_commission_rate"] = $startCommissionRate;
  183. }
  184. public function getStartCommissionRate()
  185. {
  186. return $this->startCommissionRate;
  187. }
  188. public function setStartCredit($startCredit)
  189. {
  190. $this->startCredit = $startCredit;
  191. $this->apiParas["start_credit"] = $startCredit;
  192. }
  193. public function getStartCredit()
  194. {
  195. return $this->startCredit;
  196. }
  197. public function setStartTotalAction($startTotalAction)
  198. {
  199. $this->startTotalAction = $startTotalAction;
  200. $this->apiParas["start_total_action"] = $startTotalAction;
  201. }
  202. public function getStartTotalAction()
  203. {
  204. return $this->startTotalAction;
  205. }
  206. public function getApiMethodName()
  207. {
  208. return "taobao.tbk.shop.get";
  209. }
  210. public function getApiParas()
  211. {
  212. return $this->apiParas;
  213. }
  214. public function check()
  215. {
  216. RequestCheckUtil::checkNotNull($this->fields,"fields");
  217. RequestCheckUtil::checkNotNull($this->q,"q");
  218. }
  219. public function putOtherTextParam($key, $value) {
  220. $this->apiParas[$key] = $value;
  221. $this->$key = $value;
  222. }
  223. }