OapiImpaasNewretailSendstaffmessageRequest.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <?php
  2. /**
  3. * dingtalk API: dingtalk.oapi.impaas.newretail.sendstaffmessage request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2019.07.03
  7. */
  8. class OapiImpaasNewretailSendstaffmessageRequest
  9. {
  10. /**
  11. * 消息体
  12. **/
  13. private $content;
  14. /**
  15. * 0系统消息
  16. **/
  17. private $msgType;
  18. /**
  19. * 系统账号
  20. **/
  21. private $sender;
  22. /**
  23. * 用账号列表
  24. **/
  25. private $useridList;
  26. private $apiParas = array();
  27. public function setContent($content)
  28. {
  29. $this->content = $content;
  30. $this->apiParas["content"] = $content;
  31. }
  32. public function getContent()
  33. {
  34. return $this->content;
  35. }
  36. public function setMsgType($msgType)
  37. {
  38. $this->msgType = $msgType;
  39. $this->apiParas["msg_type"] = $msgType;
  40. }
  41. public function getMsgType()
  42. {
  43. return $this->msgType;
  44. }
  45. public function setSender($sender)
  46. {
  47. $this->sender = $sender;
  48. $this->apiParas["sender"] = $sender;
  49. }
  50. public function getSender()
  51. {
  52. return $this->sender;
  53. }
  54. public function setUseridList($useridList)
  55. {
  56. $this->useridList = $useridList;
  57. $this->apiParas["userid_list"] = $useridList;
  58. }
  59. public function getUseridList()
  60. {
  61. return $this->useridList;
  62. }
  63. public function getApiMethodName()
  64. {
  65. return "dingtalk.oapi.impaas.newretail.sendstaffmessage";
  66. }
  67. public function getApiParas()
  68. {
  69. return $this->apiParas;
  70. }
  71. public function check()
  72. {
  73. RequestCheckUtil::checkMaxListSize($this->useridList,100,"useridList");
  74. }
  75. public function putOtherTextParam($key, $value) {
  76. $this->apiParas[$key] = $value;
  77. $this->$key = $value;
  78. }
  79. }