优惠券订单及其他脚本

TbkScOptimusMaterialRequest.php 3.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. <?php
  2. /**
  3. * TOP API: taobao.tbk.sc.optimus.material request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2018.10.29
  7. */
  8. class TbkScOptimusMaterialRequest
  9. {
  10. /**
  11. * mm_xxx_xxx_xxx的第三位
  12. **/
  13. private $adzoneId;
  14. /**
  15. * 内容详情ID
  16. **/
  17. private $contentId;
  18. /**
  19. * 内容渠道信息
  20. **/
  21. private $contentSource;
  22. /**
  23. * 设备号加密类型:MD5
  24. **/
  25. private $deviceEncrypt;
  26. /**
  27. * 设备号加密后的值
  28. **/
  29. private $deviceType;
  30. /**
  31. * 设备号类型:IMEI,或者IDFA,或者UTDID
  32. **/
  33. private $deviceValue;
  34. /**
  35. * 官方的物料Id(详细物料id见:https://tbk.bbs.taobao.com/detail.html?appId=45301&postId=8576096)
  36. **/
  37. private $materialId;
  38. /**
  39. * 第几页,默认:1
  40. **/
  41. private $pageNo;
  42. /**
  43. * 页大小,默认20,1~100
  44. **/
  45. private $pageSize;
  46. /**
  47. * mm_xxx_xxx_xxx的第二位
  48. **/
  49. private $siteId;
  50. private $apiParas = array();
  51. public function setAdzoneId($adzoneId)
  52. {
  53. $this->adzoneId = $adzoneId;
  54. $this->apiParas["adzone_id"] = $adzoneId;
  55. }
  56. public function getAdzoneId()
  57. {
  58. return $this->adzoneId;
  59. }
  60. public function setContentId($contentId)
  61. {
  62. $this->contentId = $contentId;
  63. $this->apiParas["content_id"] = $contentId;
  64. }
  65. public function getContentId()
  66. {
  67. return $this->contentId;
  68. }
  69. public function setContentSource($contentSource)
  70. {
  71. $this->contentSource = $contentSource;
  72. $this->apiParas["content_source"] = $contentSource;
  73. }
  74. public function getContentSource()
  75. {
  76. return $this->contentSource;
  77. }
  78. public function setDeviceEncrypt($deviceEncrypt)
  79. {
  80. $this->deviceEncrypt = $deviceEncrypt;
  81. $this->apiParas["device_encrypt"] = $deviceEncrypt;
  82. }
  83. public function getDeviceEncrypt()
  84. {
  85. return $this->deviceEncrypt;
  86. }
  87. public function setDeviceType($deviceType)
  88. {
  89. $this->deviceType = $deviceType;
  90. $this->apiParas["device_type"] = $deviceType;
  91. }
  92. public function getDeviceType()
  93. {
  94. return $this->deviceType;
  95. }
  96. public function setDeviceValue($deviceValue)
  97. {
  98. $this->deviceValue = $deviceValue;
  99. $this->apiParas["device_value"] = $deviceValue;
  100. }
  101. public function getDeviceValue()
  102. {
  103. return $this->deviceValue;
  104. }
  105. public function setMaterialId($materialId)
  106. {
  107. $this->materialId = $materialId;
  108. $this->apiParas["material_id"] = $materialId;
  109. }
  110. public function getMaterialId()
  111. {
  112. return $this->materialId;
  113. }
  114. public function setPageNo($pageNo)
  115. {
  116. $this->pageNo = $pageNo;
  117. $this->apiParas["page_no"] = $pageNo;
  118. }
  119. public function getPageNo()
  120. {
  121. return $this->pageNo;
  122. }
  123. public function setPageSize($pageSize)
  124. {
  125. $this->pageSize = $pageSize;
  126. $this->apiParas["page_size"] = $pageSize;
  127. }
  128. public function getPageSize()
  129. {
  130. return $this->pageSize;
  131. }
  132. public function setSiteId($siteId)
  133. {
  134. $this->siteId = $siteId;
  135. $this->apiParas["site_id"] = $siteId;
  136. }
  137. public function getSiteId()
  138. {
  139. return $this->siteId;
  140. }
  141. public function getApiMethodName()
  142. {
  143. return "taobao.tbk.sc.optimus.material";
  144. }
  145. public function getApiParas()
  146. {
  147. return $this->apiParas;
  148. }
  149. public function check()
  150. {
  151. RequestCheckUtil::checkNotNull($this->adzoneId,"adzoneId");
  152. RequestCheckUtil::checkMaxValue($this->pageSize,100,"pageSize");
  153. RequestCheckUtil::checkMinValue($this->pageSize,1,"pageSize");
  154. RequestCheckUtil::checkNotNull($this->siteId,"siteId");
  155. }
  156. public function putOtherTextParam($key, $value) {
  157. $this->apiParas[$key] = $value;
  158. $this->$key = $value;
  159. }
  160. }