TbkDgVegasTljCreateRequest.php 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  1. <?php
  2. /**
  3. * TOP API: taobao.tbk.dg.vegas.tlj.create request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2025.01.16
  7. */
  8. class TbkDgVegasTljCreateRequest
  9. {
  10. /**
  11. * 妈妈广告位Id
  12. **/
  13. private $adzoneId;
  14. /**
  15. * 淘礼金皮肤模版ID,1、日常模板(长期可用) 2、弹窗模板(长期可用) 3、近期大促活动模版
  16. **/
  17. private $awardImgTemplateId;
  18. /**
  19. * 已下线,后续不需要填写
  20. **/
  21. private $campaignType;
  22. /**
  23. * 宝贝ID或营销ID
  24. **/
  25. private $itemId;
  26. /**
  27. * 淘礼金名称,最大10个字符
  28. **/
  29. private $name;
  30. /**
  31. * 单个淘礼金面额,支持两位小数,单位元
  32. **/
  33. private $perFace;
  34. /**
  35. * 必须传入0
  36. **/
  37. private $securityLevel;
  38. /**
  39. * 必须设置为true,默认开启安全
  40. **/
  41. private $securitySwitch;
  42. /**
  43. * 发放截止时间
  44. **/
  45. private $sendEndTime;
  46. /**
  47. * 发放开始时间
  48. **/
  49. private $sendStartTime;
  50. /**
  51. * 淘礼金总个数
  52. **/
  53. private $totalNum;
  54. /**
  55. * 使用结束日期。如果是结束时间模式为相对时间,时间格式为1-7直接的整数, 例如,1(相对领取时间1天); 如果是绝对时间,格式为yyyy-MM-dd,例如,2019-01-29,表示到2019-01-29 23:59:59结束,格式 yyyy-MM-dd HH:mm:ss,例如,2019-01-29 20:00:10,表示从2019-01-29 20:00:10 开始
  56. **/
  57. private $useEndTime;
  58. /**
  59. * 结束日期的模式,1:相对时间,2:绝对时间
  60. **/
  61. private $useEndTimeMode;
  62. /**
  63. * 使用开始日期。相对时间,无需填写,以用户领取时间作为使用开始时间。绝对时间,格式 yyyy-MM-dd,例如,2019-01-29,表示从2019-01-29 00:00:00 开始,格式 yyyy-MM-dd HH:mm:ss,例如,2019-01-29 20:00:10,表示从2019-01-2920:00:10 开始
  64. **/
  65. private $useStartTime;
  66. /**
  67. * 淘礼金使用门槛,实付款大于等于门槛面额时才可使用此淘礼金;门槛值不能小于淘礼金面额
  68. **/
  69. private $useThreshold;
  70. /**
  71. * 单用户累计中奖次数上限
  72. **/
  73. private $userTotalWinNumLimit;
  74. private $apiParas = array();
  75. public function setAdzoneId($adzoneId)
  76. {
  77. $this->adzoneId = $adzoneId;
  78. $this->apiParas["adzone_id"] = $adzoneId;
  79. }
  80. public function getAdzoneId()
  81. {
  82. return $this->adzoneId;
  83. }
  84. public function setAwardImgTemplateId($awardImgTemplateId)
  85. {
  86. $this->awardImgTemplateId = $awardImgTemplateId;
  87. $this->apiParas["award_img_template_id"] = $awardImgTemplateId;
  88. }
  89. public function getAwardImgTemplateId()
  90. {
  91. return $this->awardImgTemplateId;
  92. }
  93. public function setCampaignType($campaignType)
  94. {
  95. $this->campaignType = $campaignType;
  96. $this->apiParas["campaign_type"] = $campaignType;
  97. }
  98. public function getCampaignType()
  99. {
  100. return $this->campaignType;
  101. }
  102. public function setItemId($itemId)
  103. {
  104. $this->itemId = $itemId;
  105. $this->apiParas["item_id"] = $itemId;
  106. }
  107. public function getItemId()
  108. {
  109. return $this->itemId;
  110. }
  111. public function setName($name)
  112. {
  113. $this->name = $name;
  114. $this->apiParas["name"] = $name;
  115. }
  116. public function getName()
  117. {
  118. return $this->name;
  119. }
  120. public function setPerFace($perFace)
  121. {
  122. $this->perFace = $perFace;
  123. $this->apiParas["per_face"] = $perFace;
  124. }
  125. public function getPerFace()
  126. {
  127. return $this->perFace;
  128. }
  129. public function setSecurityLevel($securityLevel)
  130. {
  131. $this->securityLevel = $securityLevel;
  132. $this->apiParas["security_level"] = $securityLevel;
  133. }
  134. public function getSecurityLevel()
  135. {
  136. return $this->securityLevel;
  137. }
  138. public function setSecuritySwitch($securitySwitch)
  139. {
  140. $this->securitySwitch = $securitySwitch;
  141. $this->apiParas["security_switch"] = $securitySwitch;
  142. }
  143. public function getSecuritySwitch()
  144. {
  145. return $this->securitySwitch;
  146. }
  147. public function setSendEndTime($sendEndTime)
  148. {
  149. $this->sendEndTime = $sendEndTime;
  150. $this->apiParas["send_end_time"] = $sendEndTime;
  151. }
  152. public function getSendEndTime()
  153. {
  154. return $this->sendEndTime;
  155. }
  156. public function setSendStartTime($sendStartTime)
  157. {
  158. $this->sendStartTime = $sendStartTime;
  159. $this->apiParas["send_start_time"] = $sendStartTime;
  160. }
  161. public function getSendStartTime()
  162. {
  163. return $this->sendStartTime;
  164. }
  165. public function setTotalNum($totalNum)
  166. {
  167. $this->totalNum = $totalNum;
  168. $this->apiParas["total_num"] = $totalNum;
  169. }
  170. public function getTotalNum()
  171. {
  172. return $this->totalNum;
  173. }
  174. public function setUseEndTime($useEndTime)
  175. {
  176. $this->useEndTime = $useEndTime;
  177. $this->apiParas["use_end_time"] = $useEndTime;
  178. }
  179. public function getUseEndTime()
  180. {
  181. return $this->useEndTime;
  182. }
  183. public function setUseEndTimeMode($useEndTimeMode)
  184. {
  185. $this->useEndTimeMode = $useEndTimeMode;
  186. $this->apiParas["use_end_time_mode"] = $useEndTimeMode;
  187. }
  188. public function getUseEndTimeMode()
  189. {
  190. return $this->useEndTimeMode;
  191. }
  192. public function setUseStartTime($useStartTime)
  193. {
  194. $this->useStartTime = $useStartTime;
  195. $this->apiParas["use_start_time"] = $useStartTime;
  196. }
  197. public function getUseStartTime()
  198. {
  199. return $this->useStartTime;
  200. }
  201. public function setUseThreshold($useThreshold)
  202. {
  203. $this->useThreshold = $useThreshold;
  204. $this->apiParas["use_threshold"] = $useThreshold;
  205. }
  206. public function getUseThreshold()
  207. {
  208. return $this->useThreshold;
  209. }
  210. public function setUserTotalWinNumLimit($userTotalWinNumLimit)
  211. {
  212. $this->userTotalWinNumLimit = $userTotalWinNumLimit;
  213. $this->apiParas["user_total_win_num_limit"] = $userTotalWinNumLimit;
  214. }
  215. public function getUserTotalWinNumLimit()
  216. {
  217. return $this->userTotalWinNumLimit;
  218. }
  219. public function getApiMethodName()
  220. {
  221. return "taobao.tbk.dg.vegas.tlj.create";
  222. }
  223. public function getApiParas()
  224. {
  225. return $this->apiParas;
  226. }
  227. public function check()
  228. {
  229. RequestCheckUtil::checkNotNull($this->adzoneId,"adzoneId");
  230. RequestCheckUtil::checkNotNull($this->itemId,"itemId");
  231. RequestCheckUtil::checkNotNull($this->name,"name");
  232. RequestCheckUtil::checkNotNull($this->perFace,"perFace");
  233. RequestCheckUtil::checkNotNull($this->securitySwitch,"securitySwitch");
  234. RequestCheckUtil::checkNotNull($this->sendStartTime,"sendStartTime");
  235. RequestCheckUtil::checkNotNull($this->totalNum,"totalNum");
  236. RequestCheckUtil::checkNotNull($this->userTotalWinNumLimit,"userTotalWinNumLimit");
  237. }
  238. public function putOtherTextParam($key, $value) {
  239. $this->apiParas[$key] = $value;
  240. $this->$key = $value;
  241. }
  242. }