OapiUserTokenGetRequest.php 869 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. /**
  3. * dingtalk API: dingtalk.oapi.user.token.get request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2021.01.20
  7. */
  8. class OapiUserTokenGetRequest
  9. {
  10. /**
  11. * 员工id
  12. **/
  13. private $userid;
  14. private $apiParas = array();
  15. public function setUserid($userid)
  16. {
  17. $this->userid = $userid;
  18. $this->apiParas["userid"] = $userid;
  19. }
  20. public function getUserid()
  21. {
  22. return $this->userid;
  23. }
  24. public function getApiMethodName()
  25. {
  26. return "dingtalk.oapi.user.token.get";
  27. }
  28. public function getApiParas()
  29. {
  30. return $this->apiParas;
  31. }
  32. public function check()
  33. {
  34. RequestCheckUtil::checkNotNull($this->userid,"userid");
  35. RequestCheckUtil::checkMaxLength($this->userid,64,"userid");
  36. }
  37. public function putOtherTextParam($key, $value) {
  38. $this->apiParas[$key] = $value;
  39. $this->$key = $value;
  40. }
  41. }