OapiCardIntelligentEmpgroupSendRequest.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <?php
  2. /**
  3. * dingtalk API: dingtalk.oapi.card.intelligent.empgroup.send request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2020.08.17
  7. */
  8. class OapiCardIntelligentEmpgroupSendRequest
  9. {
  10. /**
  11. * 模版卡片注册的key
  12. **/
  13. private $msgKey;
  14. /**
  15. * 卡片中需要填充的参数
  16. **/
  17. private $paramJson;
  18. /**
  19. * 卡片接收成员列表,不填写为全部接收
  20. **/
  21. private $receiverList;
  22. /**
  23. * 卡片消息去重复,长度不能大于64
  24. **/
  25. private $uuid;
  26. private $apiParas = array();
  27. public function setMsgKey($msgKey)
  28. {
  29. $this->msgKey = $msgKey;
  30. $this->apiParas["msg_key"] = $msgKey;
  31. }
  32. public function getMsgKey()
  33. {
  34. return $this->msgKey;
  35. }
  36. public function setParamJson($paramJson)
  37. {
  38. $this->paramJson = $paramJson;
  39. $this->apiParas["param_json"] = $paramJson;
  40. }
  41. public function getParamJson()
  42. {
  43. return $this->paramJson;
  44. }
  45. public function setReceiverList($receiverList)
  46. {
  47. $this->receiverList = $receiverList;
  48. $this->apiParas["receiver_list"] = $receiverList;
  49. }
  50. public function getReceiverList()
  51. {
  52. return $this->receiverList;
  53. }
  54. public function setUuid($uuid)
  55. {
  56. $this->uuid = $uuid;
  57. $this->apiParas["uuid"] = $uuid;
  58. }
  59. public function getUuid()
  60. {
  61. return $this->uuid;
  62. }
  63. public function getApiMethodName()
  64. {
  65. return "dingtalk.oapi.card.intelligent.empgroup.send";
  66. }
  67. public function getApiParas()
  68. {
  69. return $this->apiParas;
  70. }
  71. public function check()
  72. {
  73. RequestCheckUtil::checkNotNull($this->msgKey,"msgKey");
  74. RequestCheckUtil::checkMaxListSize($this->receiverList,999,"receiverList");
  75. }
  76. public function putOtherTextParam($key, $value) {
  77. $this->apiParas[$key] = $value;
  78. $this->$key = $value;
  79. }
  80. }