123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- <?php
- /**
- * dingtalk API: dingtalk.oapi.robot.message.sendoto request
- *
- * @author auto create
- * @since 1.0, 2022.10.13
- */
- class OapiRobotMessageSendotoRequest
- {
- /**
- * 申请到的企业机器人唯一标识符
- **/
- private $chatbotId;
-
- /**
- * 申请到的消息模板唯一标识符
- **/
- private $msgKey;
-
- /**
- * 消息模板中,变量本次替换的值
- **/
- private $msgParam;
-
- /**
- * 员工的userid
- **/
- private $staffId;
-
- private $apiParas = array();
-
- public function setChatbotId($chatbotId)
- {
- $this->chatbotId = $chatbotId;
- $this->apiParas["chatbot_id"] = $chatbotId;
- }
- public function getChatbotId()
- {
- return $this->chatbotId;
- }
- public function setMsgKey($msgKey)
- {
- $this->msgKey = $msgKey;
- $this->apiParas["msg_key"] = $msgKey;
- }
- public function getMsgKey()
- {
- return $this->msgKey;
- }
- public function setMsgParam($msgParam)
- {
- $this->msgParam = $msgParam;
- $this->apiParas["msg_param"] = $msgParam;
- }
- public function getMsgParam()
- {
- return $this->msgParam;
- }
- public function setStaffId($staffId)
- {
- $this->staffId = $staffId;
- $this->apiParas["staff_id"] = $staffId;
- }
- public function getStaffId()
- {
- return $this->staffId;
- }
- public function getApiMethodName()
- {
- return "dingtalk.oapi.robot.message.sendoto";
- }
-
- public function getApiParas()
- {
- return $this->apiParas;
- }
-
- public function check()
- {
-
- RequestCheckUtil::checkNotNull($this->chatbotId,"chatbotId");
- RequestCheckUtil::checkNotNull($this->msgKey,"msgKey");
- RequestCheckUtil::checkNotNull($this->msgParam,"msgParam");
- RequestCheckUtil::checkNotNull($this->staffId,"staffId");
- }
-
- public function putOtherTextParam($key, $value) {
- $this->apiParas[$key] = $value;
- $this->$key = $value;
- }
- }
|