OapiMessageSendToSingleConversationRequest.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <?php
  2. /**
  3. * dingtalk API: dingtalk.oapi.message.send_to_single_conversation request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2019.07.01
  7. */
  8. class OapiMessageSendToSingleConversationRequest
  9. {
  10. /**
  11. * 推送消息内容
  12. **/
  13. private $msg;
  14. /**
  15. * 接收者userId
  16. **/
  17. private $receiverUserid;
  18. /**
  19. * 发送者userId
  20. **/
  21. private $senderUserid;
  22. private $apiParas = array();
  23. public function setMsg($msg)
  24. {
  25. $this->msg = $msg;
  26. $this->apiParas["msg"] = $msg;
  27. }
  28. public function getMsg()
  29. {
  30. return $this->msg;
  31. }
  32. public function setReceiverUserid($receiverUserid)
  33. {
  34. $this->receiverUserid = $receiverUserid;
  35. $this->apiParas["receiver_userid"] = $receiverUserid;
  36. }
  37. public function getReceiverUserid()
  38. {
  39. return $this->receiverUserid;
  40. }
  41. public function setSenderUserid($senderUserid)
  42. {
  43. $this->senderUserid = $senderUserid;
  44. $this->apiParas["sender_userid"] = $senderUserid;
  45. }
  46. public function getSenderUserid()
  47. {
  48. return $this->senderUserid;
  49. }
  50. public function getApiMethodName()
  51. {
  52. return "dingtalk.oapi.message.send_to_single_conversation";
  53. }
  54. public function getApiParas()
  55. {
  56. return $this->apiParas;
  57. }
  58. public function check()
  59. {
  60. RequestCheckUtil::checkNotNull($this->receiverUserid,"receiverUserid");
  61. RequestCheckUtil::checkNotNull($this->senderUserid,"senderUserid");
  62. }
  63. public function putOtherTextParam($key, $value) {
  64. $this->apiParas[$key] = $value;
  65. $this->$key = $value;
  66. }
  67. }