OapiSmartworkHrmEmployeeListRequest.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <?php
  2. /**
  3. * dingtalk API: dingtalk.oapi.smartwork.hrm.employee.list request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2020.03.02
  7. */
  8. class OapiSmartworkHrmEmployeeListRequest
  9. {
  10. /**
  11. * 微应用在企业的agentId
  12. **/
  13. private $agentid;
  14. /**
  15. * 需要获取的花名册字段信息
  16. **/
  17. private $fieldFilterList;
  18. /**
  19. * 员工id列表
  20. **/
  21. private $useridList;
  22. private $apiParas = array();
  23. public function setAgentid($agentid)
  24. {
  25. $this->agentid = $agentid;
  26. $this->apiParas["agentid"] = $agentid;
  27. }
  28. public function getAgentid()
  29. {
  30. return $this->agentid;
  31. }
  32. public function setFieldFilterList($fieldFilterList)
  33. {
  34. $this->fieldFilterList = $fieldFilterList;
  35. $this->apiParas["field_filter_list"] = $fieldFilterList;
  36. }
  37. public function getFieldFilterList()
  38. {
  39. return $this->fieldFilterList;
  40. }
  41. public function setUseridList($useridList)
  42. {
  43. $this->useridList = $useridList;
  44. $this->apiParas["userid_list"] = $useridList;
  45. }
  46. public function getUseridList()
  47. {
  48. return $this->useridList;
  49. }
  50. public function getApiMethodName()
  51. {
  52. return "dingtalk.oapi.smartwork.hrm.employee.list";
  53. }
  54. public function getApiParas()
  55. {
  56. return $this->apiParas;
  57. }
  58. public function check()
  59. {
  60. RequestCheckUtil::checkMaxListSize($this->fieldFilterList,100,"fieldFilterList");
  61. RequestCheckUtil::checkNotNull($this->useridList,"useridList");
  62. RequestCheckUtil::checkMaxListSize($this->useridList,50,"useridList");
  63. }
  64. public function putOtherTextParam($key, $value) {
  65. $this->apiParas[$key] = $value;
  66. $this->$key = $value;
  67. }
  68. }