OapiMicroappAddwithuseridRequest.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?php
  2. /**
  3. * dingtalk API: dingtalk.oapi.microapp.addwithuserid request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2019.07.03
  7. */
  8. class OapiMicroappAddwithuseridRequest
  9. {
  10. /**
  11. * 微应用实例化id,表示企业和微应用的唯一关系
  12. **/
  13. private $agentId;
  14. /**
  15. * 用户id列表,最多10个
  16. **/
  17. private $userids;
  18. private $apiParas = array();
  19. public function setAgentId($agentId)
  20. {
  21. $this->agentId = $agentId;
  22. $this->apiParas["agentId"] = $agentId;
  23. }
  24. public function getAgentId()
  25. {
  26. return $this->agentId;
  27. }
  28. public function setUserids($userids)
  29. {
  30. $this->userids = $userids;
  31. $this->apiParas["userids"] = $userids;
  32. }
  33. public function getUserids()
  34. {
  35. return $this->userids;
  36. }
  37. public function getApiMethodName()
  38. {
  39. return "dingtalk.oapi.microapp.addwithuserid";
  40. }
  41. public function getApiParas()
  42. {
  43. return $this->apiParas;
  44. }
  45. public function check()
  46. {
  47. RequestCheckUtil::checkNotNull($this->agentId,"agentId");
  48. RequestCheckUtil::checkNotNull($this->userids,"userids");
  49. RequestCheckUtil::checkMaxListSize($this->userids,20,"userids");
  50. }
  51. public function putOtherTextParam($key, $value) {
  52. $this->apiParas[$key] = $value;
  53. $this->$key = $value;
  54. }
  55. }