优惠券订单及其他脚本

TbkDgItemCouponGetRequest.php 2.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <?php
  2. /**
  3. * TOP API: taobao.tbk.dg.item.coupon.get request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2018.11.08
  7. */
  8. class TbkDgItemCouponGetRequest
  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. * 第几页,默认:1(当后台类目和查询词均不指定的时候,最多出10000个结果,即page_no*page_size不能超过10000;当指定类目或关键词的时候,则最多出100个结果)
  20. **/
  21. private $pageNo;
  22. /**
  23. * 页大小,默认20,1~100
  24. **/
  25. private $pageSize;
  26. /**
  27. * 1:PC,2:无线,默认:1
  28. **/
  29. private $platform;
  30. /**
  31. * 查询词
  32. **/
  33. private $q;
  34. private $apiParas = array();
  35. public function setAdzoneId($adzoneId)
  36. {
  37. $this->adzoneId = $adzoneId;
  38. $this->apiParas["adzone_id"] = $adzoneId;
  39. }
  40. public function getAdzoneId()
  41. {
  42. return $this->adzoneId;
  43. }
  44. public function setCat($cat)
  45. {
  46. $this->cat = $cat;
  47. $this->apiParas["cat"] = $cat;
  48. }
  49. public function getCat()
  50. {
  51. return $this->cat;
  52. }
  53. public function setPageNo($pageNo)
  54. {
  55. $this->pageNo = $pageNo;
  56. $this->apiParas["page_no"] = $pageNo;
  57. }
  58. public function getPageNo()
  59. {
  60. return $this->pageNo;
  61. }
  62. public function setPageSize($pageSize)
  63. {
  64. $this->pageSize = $pageSize;
  65. $this->apiParas["page_size"] = $pageSize;
  66. }
  67. public function getPageSize()
  68. {
  69. return $this->pageSize;
  70. }
  71. public function setPlatform($platform)
  72. {
  73. $this->platform = $platform;
  74. $this->apiParas["platform"] = $platform;
  75. }
  76. public function getPlatform()
  77. {
  78. return $this->platform;
  79. }
  80. public function setQ($q)
  81. {
  82. $this->q = $q;
  83. $this->apiParas["q"] = $q;
  84. }
  85. public function getQ()
  86. {
  87. return $this->q;
  88. }
  89. public function getApiMethodName()
  90. {
  91. return "taobao.tbk.dg.item.coupon.get";
  92. }
  93. public function getApiParas()
  94. {
  95. return $this->apiParas;
  96. }
  97. public function check()
  98. {
  99. RequestCheckUtil::checkNotNull($this->adzoneId,"adzoneId");
  100. RequestCheckUtil::checkMaxLength($this->cat,10,"cat");
  101. }
  102. public function putOtherTextParam($key, $value) {
  103. $this->apiParas[$key] = $value;
  104. $this->$key = $value;
  105. }
  106. }