Aucune description

TbkDgOptimusMaterialRequest.php 3.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. <?php
  2. /**
  3. * TOP API: taobao.tbk.dg.optimus.material request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2018.09.13
  7. */
  8. class TbkDgOptimusMaterialRequest
  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. * 设备号类型:IMEI,或者IDFA,或者UTDID
  28. **/
  29. private $deviceType;
  30. /**
  31. * 设备号加密后的值
  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. private $apiParas = array();
  47. public function setAdzoneId($adzoneId)
  48. {
  49. $this->adzoneId = $adzoneId;
  50. $this->apiParas["adzone_id"] = $adzoneId;
  51. }
  52. public function getAdzoneId()
  53. {
  54. return $this->adzoneId;
  55. }
  56. public function setContentId($contentId)
  57. {
  58. $this->contentId = $contentId;
  59. $this->apiParas["content_id"] = $contentId;
  60. }
  61. public function getContentId()
  62. {
  63. return $this->contentId;
  64. }
  65. public function setContentSource($contentSource)
  66. {
  67. $this->contentSource = $contentSource;
  68. $this->apiParas["content_source"] = $contentSource;
  69. }
  70. public function getContentSource()
  71. {
  72. return $this->contentSource;
  73. }
  74. public function setDeviceEncrypt($deviceEncrypt)
  75. {
  76. $this->deviceEncrypt = $deviceEncrypt;
  77. $this->apiParas["device_encrypt"] = $deviceEncrypt;
  78. }
  79. public function getDeviceEncrypt()
  80. {
  81. return $this->deviceEncrypt;
  82. }
  83. public function setDeviceType($deviceType)
  84. {
  85. $this->deviceType = $deviceType;
  86. $this->apiParas["device_type"] = $deviceType;
  87. }
  88. public function getDeviceType()
  89. {
  90. return $this->deviceType;
  91. }
  92. public function setDeviceValue($deviceValue)
  93. {
  94. $this->deviceValue = $deviceValue;
  95. $this->apiParas["device_value"] = $deviceValue;
  96. }
  97. public function getDeviceValue()
  98. {
  99. return $this->deviceValue;
  100. }
  101. public function setMaterialId($materialId)
  102. {
  103. $this->materialId = $materialId;
  104. $this->apiParas["material_id"] = $materialId;
  105. }
  106. public function getMaterialId()
  107. {
  108. return $this->materialId;
  109. }
  110. public function setPageNo($pageNo)
  111. {
  112. $this->pageNo = $pageNo;
  113. $this->apiParas["page_no"] = $pageNo;
  114. }
  115. public function getPageNo()
  116. {
  117. return $this->pageNo;
  118. }
  119. public function setPageSize($pageSize)
  120. {
  121. $this->pageSize = $pageSize;
  122. $this->apiParas["page_size"] = $pageSize;
  123. }
  124. public function getPageSize()
  125. {
  126. return $this->pageSize;
  127. }
  128. public function getApiMethodName()
  129. {
  130. return "taobao.tbk.dg.optimus.material";
  131. }
  132. public function getApiParas()
  133. {
  134. return $this->apiParas;
  135. }
  136. public function check()
  137. {
  138. RequestCheckUtil::checkNotNull($this->adzoneId,"adzoneId");
  139. RequestCheckUtil::checkMaxValue($this->pageSize,100,"pageSize");
  140. RequestCheckUtil::checkMinValue($this->pageSize,1,"pageSize");
  141. }
  142. public function putOtherTextParam($key, $value) {
  143. $this->apiParas[$key] = $value;
  144. $this->$key = $value;
  145. }
  146. }