OapiChatQrcodeGetRequest.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <?php
  2. /**
  3. * dingtalk API: dingtalk.oapi.chat.qrcode.get request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2021.07.09
  7. */
  8. class OapiChatQrcodeGetRequest
  9. {
  10. /**
  11. * 会话id(逐步淘汰推荐使用openConversationId)
  12. **/
  13. private $chatid;
  14. /**
  15. * 开放群id(与会话id 二选一)
  16. **/
  17. private $openConversationId;
  18. /**
  19. * 分享二维码用户id
  20. **/
  21. private $userid;
  22. private $apiParas = array();
  23. public function setChatid($chatid)
  24. {
  25. $this->chatid = $chatid;
  26. $this->apiParas["chatid"] = $chatid;
  27. }
  28. public function getChatid()
  29. {
  30. return $this->chatid;
  31. }
  32. public function setOpenConversationId($openConversationId)
  33. {
  34. $this->openConversationId = $openConversationId;
  35. $this->apiParas["openConversationId"] = $openConversationId;
  36. }
  37. public function getOpenConversationId()
  38. {
  39. return $this->openConversationId;
  40. }
  41. public function setUserid($userid)
  42. {
  43. $this->userid = $userid;
  44. $this->apiParas["userid"] = $userid;
  45. }
  46. public function getUserid()
  47. {
  48. return $this->userid;
  49. }
  50. public function getApiMethodName()
  51. {
  52. return "dingtalk.oapi.chat.qrcode.get";
  53. }
  54. public function getApiParas()
  55. {
  56. return $this->apiParas;
  57. }
  58. public function check()
  59. {
  60. RequestCheckUtil::checkNotNull($this->userid,"userid");
  61. }
  62. public function putOtherTextParam($key, $value) {
  63. $this->apiParas[$key] = $value;
  64. $this->$key = $value;
  65. }
  66. }