TbkDgVegasTljCreateRequest.php 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  1. <?php
  2. /**
  3. * TOP API: taobao.tbk.dg.vegas.tlj.create request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2020.08.18
  7. */
  8. class TbkDgVegasTljCreateRequest
  9. {
  10. /**
  11. * 妈妈广告位Id
  12. **/
  13. private $adzoneId;
  14. /**
  15. * CPS佣金计划类型
  16. **/
  17. private $campaignType;
  18. /**
  19. * 宝贝id
  20. **/
  21. private $itemId;
  22. /**
  23. * 淘礼金名称,最大10个字符
  24. **/
  25. private $name;
  26. /**
  27. * 单个淘礼金面额,支持两位小数,单位元
  28. **/
  29. private $perFace;
  30. /**
  31. * 安全等级,0:适用于常规淘礼金投放场景;1:更高安全级别,适用于淘礼金面额偏大等安全性较高的淘礼金投放场景,可能导致更多用户拦截。security_switch为true,此字段不填写时,使用0作为默认安全级别。如果security_switch为false,不进行安全判断。
  32. **/
  33. private $securityLevel;
  34. /**
  35. * 安全开关,若不进行安全校验,可能放大您的资损风险,请谨慎选择
  36. **/
  37. private $securitySwitch;
  38. /**
  39. * 发放截止时间
  40. **/
  41. private $sendEndTime;
  42. /**
  43. * 发放开始时间
  44. **/
  45. private $sendStartTime;
  46. /**
  47. * 淘礼金总个数
  48. **/
  49. private $totalNum;
  50. /**
  51. * 使用结束日期。如果是结束时间模式为相对时间,时间格式为1-7直接的整数, 例如,1(相对领取时间1天); 如果是绝对时间,格式为yyyy-MM-dd,例如,2019-01-29,表示到2019-01-29 23:59:59结束
  52. **/
  53. private $useEndTime;
  54. /**
  55. * 结束日期的模式,1:相对时间,2:绝对时间
  56. **/
  57. private $useEndTimeMode;
  58. /**
  59. * 使用开始日期。相对时间,无需填写,以用户领取时间作为使用开始时间。绝对时间,格式 yyyy-MM-dd,例如,2019-01-29,表示从2019-01-29 00:00:00 开始
  60. **/
  61. private $useStartTime;
  62. /**
  63. * 单用户累计中奖次数上限
  64. **/
  65. private $userTotalWinNumLimit;
  66. private $apiParas = array();
  67. public function setAdzoneId($adzoneId)
  68. {
  69. $this->adzoneId = $adzoneId;
  70. $this->apiParas["adzone_id"] = $adzoneId;
  71. }
  72. public function getAdzoneId()
  73. {
  74. return $this->adzoneId;
  75. }
  76. public function setCampaignType($campaignType)
  77. {
  78. $this->campaignType = $campaignType;
  79. $this->apiParas["campaign_type"] = $campaignType;
  80. }
  81. public function getCampaignType()
  82. {
  83. return $this->campaignType;
  84. }
  85. public function setItemId($itemId)
  86. {
  87. $this->itemId = $itemId;
  88. $this->apiParas["item_id"] = $itemId;
  89. }
  90. public function getItemId()
  91. {
  92. return $this->itemId;
  93. }
  94. public function setName($name)
  95. {
  96. $this->name = $name;
  97. $this->apiParas["name"] = $name;
  98. }
  99. public function getName()
  100. {
  101. return $this->name;
  102. }
  103. public function setPerFace($perFace)
  104. {
  105. $this->perFace = $perFace;
  106. $this->apiParas["per_face"] = $perFace;
  107. }
  108. public function getPerFace()
  109. {
  110. return $this->perFace;
  111. }
  112. public function setSecurityLevel($securityLevel)
  113. {
  114. $this->securityLevel = $securityLevel;
  115. $this->apiParas["security_level"] = $securityLevel;
  116. }
  117. public function getSecurityLevel()
  118. {
  119. return $this->securityLevel;
  120. }
  121. public function setSecuritySwitch($securitySwitch)
  122. {
  123. $this->securitySwitch = $securitySwitch;
  124. $this->apiParas["security_switch"] = $securitySwitch;
  125. }
  126. public function getSecuritySwitch()
  127. {
  128. return $this->securitySwitch;
  129. }
  130. public function setSendEndTime($sendEndTime)
  131. {
  132. $this->sendEndTime = $sendEndTime;
  133. $this->apiParas["send_end_time"] = $sendEndTime;
  134. }
  135. public function getSendEndTime()
  136. {
  137. return $this->sendEndTime;
  138. }
  139. public function setSendStartTime($sendStartTime)
  140. {
  141. $this->sendStartTime = $sendStartTime;
  142. $this->apiParas["send_start_time"] = $sendStartTime;
  143. }
  144. public function getSendStartTime()
  145. {
  146. return $this->sendStartTime;
  147. }
  148. public function setTotalNum($totalNum)
  149. {
  150. $this->totalNum = $totalNum;
  151. $this->apiParas["total_num"] = $totalNum;
  152. }
  153. public function getTotalNum()
  154. {
  155. return $this->totalNum;
  156. }
  157. public function setUseEndTime($useEndTime)
  158. {
  159. $this->useEndTime = $useEndTime;
  160. $this->apiParas["use_end_time"] = $useEndTime;
  161. }
  162. public function getUseEndTime()
  163. {
  164. return $this->useEndTime;
  165. }
  166. public function setUseEndTimeMode($useEndTimeMode)
  167. {
  168. $this->useEndTimeMode = $useEndTimeMode;
  169. $this->apiParas["use_end_time_mode"] = $useEndTimeMode;
  170. }
  171. public function getUseEndTimeMode()
  172. {
  173. return $this->useEndTimeMode;
  174. }
  175. public function setUseStartTime($useStartTime)
  176. {
  177. $this->useStartTime = $useStartTime;
  178. $this->apiParas["use_start_time"] = $useStartTime;
  179. }
  180. public function getUseStartTime()
  181. {
  182. return $this->useStartTime;
  183. }
  184. public function setUserTotalWinNumLimit($userTotalWinNumLimit)
  185. {
  186. $this->userTotalWinNumLimit = $userTotalWinNumLimit;
  187. $this->apiParas["user_total_win_num_limit"] = $userTotalWinNumLimit;
  188. }
  189. public function getUserTotalWinNumLimit()
  190. {
  191. return $this->userTotalWinNumLimit;
  192. }
  193. public function getApiMethodName()
  194. {
  195. return "taobao.tbk.dg.vegas.tlj.create";
  196. }
  197. public function getApiParas()
  198. {
  199. return $this->apiParas;
  200. }
  201. public function check()
  202. {
  203. RequestCheckUtil::checkNotNull($this->adzoneId,"adzoneId");
  204. RequestCheckUtil::checkNotNull($this->itemId,"itemId");
  205. RequestCheckUtil::checkNotNull($this->name,"name");
  206. RequestCheckUtil::checkNotNull($this->perFace,"perFace");
  207. RequestCheckUtil::checkNotNull($this->securitySwitch,"securitySwitch");
  208. RequestCheckUtil::checkNotNull($this->sendStartTime,"sendStartTime");
  209. RequestCheckUtil::checkNotNull($this->totalNum,"totalNum");
  210. RequestCheckUtil::checkNotNull($this->userTotalWinNumLimit,"userTotalWinNumLimit");
  211. }
  212. public function putOtherTextParam($key, $value) {
  213. $this->apiParas[$key] = $value;
  214. $this->$key = $value;
  215. }
  216. }