AlipayOpenPublicLifeMsgSendRequest.php 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337
  1. <?php
  2. /**
  3. * ALIPAY API: alipay.open.public.life.msg.send request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2019-01-07 20:51:15
  7. */
  8. class AlipayOpenPublicLifeMsgSendRequest
  9. {
  10. /**
  11. * 消息分类,请传入对应分类编码值
  12. **/
  13. private $category;
  14. /**
  15. * 消息正文,html原文或纯文本
  16. **/
  17. private $content;
  18. /**
  19. * 消息背景图片(目前支持格式jpg, jpeg, bmp),需上传图片原始二进制流,图片最大1MB
  20. **/
  21. private $cover;
  22. /**
  23. * 消息概述
  24. **/
  25. private $desc;
  26. /**
  27. * 媒体资讯类生活号消息类型
  28. **/
  29. private $msgType;
  30. /**
  31. * 消息来源方附属信息,供搜索、推荐使用
  32. publish_time(int):消息发布时间,单位秒
  33. keyword_list(String): 文章的标签列表,英文逗号分隔
  34. comment(int):消息来源处评论次数
  35. reward(int):消息来源处打赏次数
  36. is_recommended(boolean):消息在来源处是否被推荐
  37. is_news(boolean):消息是否实时性内容
  38. read(int):消息在来源处被阅读次数
  39. like(int):消息在来源处被点赞次数
  40. is_hot(boolean):消息在来源平台是否是热门内容
  41. share(int):文章在来源平台的分享次数
  42. deadline(int):文章的失效时间,单位秒
  43. **/
  44. private $sourceExtInfo;
  45. /**
  46. * 消息标题
  47. **/
  48. private $title;
  49. /**
  50. * 来源方消息唯一标识;若不为空,根据此id和生活号id对消息去重;若为空,不去重
  51. **/
  52. private $uniqueMsgId;
  53. /**
  54. * 生活号消息视频时长,单位:秒(视频类消息必填)
  55. **/
  56. private $videoLength;
  57. /**
  58. * 视频类型消息中视频抽样关键帧截图,视频类消息选填
  59. **/
  60. private $videoSamples;
  61. /**
  62. * 视频大小,单位:KB(视频类消息必填)
  63. **/
  64. private $videoSize;
  65. /**
  66. * 视频资源来源id(视频类消息必填),取值限定youku, miaopai, taobao, sina中的一个
  67. **/
  68. private $videoSource;
  69. /**
  70. * 视频的临时链接(优酷来源的视频消息,该字段不能为空)
  71. **/
  72. private $videoTemporaryUrl;
  73. /**
  74. * 生活号视频类消息视频id或url(视频类消息必填,根据来源区分)
  75. **/
  76. private $videoUrl;
  77. private $apiParas = array();
  78. private $terminalType;
  79. private $terminalInfo;
  80. private $prodCode;
  81. private $apiVersion="1.0";
  82. private $notifyUrl;
  83. private $returnUrl;
  84. private $needEncrypt=false;
  85. public function setCategory($category)
  86. {
  87. $this->category = $category;
  88. $this->apiParas["category"] = $category;
  89. }
  90. public function getCategory()
  91. {
  92. return $this->category;
  93. }
  94. public function setContent($content)
  95. {
  96. $this->content = $content;
  97. $this->apiParas["content"] = $content;
  98. }
  99. public function getContent()
  100. {
  101. return $this->content;
  102. }
  103. public function setCover($cover)
  104. {
  105. $this->cover = $cover;
  106. $this->apiParas["cover"] = $cover;
  107. }
  108. public function getCover()
  109. {
  110. return $this->cover;
  111. }
  112. public function setDesc($desc)
  113. {
  114. $this->desc = $desc;
  115. $this->apiParas["desc"] = $desc;
  116. }
  117. public function getDesc()
  118. {
  119. return $this->desc;
  120. }
  121. public function setMsgType($msgType)
  122. {
  123. $this->msgType = $msgType;
  124. $this->apiParas["msg_type"] = $msgType;
  125. }
  126. public function getMsgType()
  127. {
  128. return $this->msgType;
  129. }
  130. public function setSourceExtInfo($sourceExtInfo)
  131. {
  132. $this->sourceExtInfo = $sourceExtInfo;
  133. $this->apiParas["source_ext_info"] = $sourceExtInfo;
  134. }
  135. public function getSourceExtInfo()
  136. {
  137. return $this->sourceExtInfo;
  138. }
  139. public function setTitle($title)
  140. {
  141. $this->title = $title;
  142. $this->apiParas["title"] = $title;
  143. }
  144. public function getTitle()
  145. {
  146. return $this->title;
  147. }
  148. public function setUniqueMsgId($uniqueMsgId)
  149. {
  150. $this->uniqueMsgId = $uniqueMsgId;
  151. $this->apiParas["unique_msg_id"] = $uniqueMsgId;
  152. }
  153. public function getUniqueMsgId()
  154. {
  155. return $this->uniqueMsgId;
  156. }
  157. public function setVideoLength($videoLength)
  158. {
  159. $this->videoLength = $videoLength;
  160. $this->apiParas["video_length"] = $videoLength;
  161. }
  162. public function getVideoLength()
  163. {
  164. return $this->videoLength;
  165. }
  166. public function setVideoSamples($videoSamples)
  167. {
  168. $this->videoSamples = $videoSamples;
  169. $this->apiParas["video_samples"] = $videoSamples;
  170. }
  171. public function getVideoSamples()
  172. {
  173. return $this->videoSamples;
  174. }
  175. public function setVideoSize($videoSize)
  176. {
  177. $this->videoSize = $videoSize;
  178. $this->apiParas["video_size"] = $videoSize;
  179. }
  180. public function getVideoSize()
  181. {
  182. return $this->videoSize;
  183. }
  184. public function setVideoSource($videoSource)
  185. {
  186. $this->videoSource = $videoSource;
  187. $this->apiParas["video_source"] = $videoSource;
  188. }
  189. public function getVideoSource()
  190. {
  191. return $this->videoSource;
  192. }
  193. public function setVideoTemporaryUrl($videoTemporaryUrl)
  194. {
  195. $this->videoTemporaryUrl = $videoTemporaryUrl;
  196. $this->apiParas["video_temporary_url"] = $videoTemporaryUrl;
  197. }
  198. public function getVideoTemporaryUrl()
  199. {
  200. return $this->videoTemporaryUrl;
  201. }
  202. public function setVideoUrl($videoUrl)
  203. {
  204. $this->videoUrl = $videoUrl;
  205. $this->apiParas["video_url"] = $videoUrl;
  206. }
  207. public function getVideoUrl()
  208. {
  209. return $this->videoUrl;
  210. }
  211. public function getApiMethodName()
  212. {
  213. return "alipay.open.public.life.msg.send";
  214. }
  215. public function setNotifyUrl($notifyUrl)
  216. {
  217. $this->notifyUrl=$notifyUrl;
  218. }
  219. public function getNotifyUrl()
  220. {
  221. return $this->notifyUrl;
  222. }
  223. public function setReturnUrl($returnUrl)
  224. {
  225. $this->returnUrl=$returnUrl;
  226. }
  227. public function getReturnUrl()
  228. {
  229. return $this->returnUrl;
  230. }
  231. public function getApiParas()
  232. {
  233. return $this->apiParas;
  234. }
  235. public function getTerminalType()
  236. {
  237. return $this->terminalType;
  238. }
  239. public function setTerminalType($terminalType)
  240. {
  241. $this->terminalType = $terminalType;
  242. }
  243. public function getTerminalInfo()
  244. {
  245. return $this->terminalInfo;
  246. }
  247. public function setTerminalInfo($terminalInfo)
  248. {
  249. $this->terminalInfo = $terminalInfo;
  250. }
  251. public function getProdCode()
  252. {
  253. return $this->prodCode;
  254. }
  255. public function setProdCode($prodCode)
  256. {
  257. $this->prodCode = $prodCode;
  258. }
  259. public function setApiVersion($apiVersion)
  260. {
  261. $this->apiVersion=$apiVersion;
  262. }
  263. public function getApiVersion()
  264. {
  265. return $this->apiVersion;
  266. }
  267. public function setNeedEncrypt($needEncrypt)
  268. {
  269. $this->needEncrypt=$needEncrypt;
  270. }
  271. public function getNeedEncrypt()
  272. {
  273. return $this->needEncrypt;
  274. }
  275. }