OapiV2DepartmentGetRequest.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?php
  2. /**
  3. * dingtalk API: dingtalk.oapi.v2.department.get request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2021.08.25
  7. */
  8. class OapiV2DepartmentGetRequest
  9. {
  10. /**
  11. * 部门id,根部门ID为1
  12. **/
  13. private $deptId;
  14. /**
  15. * 通讯录语言(默认zh_CN)
  16. **/
  17. private $language;
  18. private $apiParas = array();
  19. public function setDeptId($deptId)
  20. {
  21. $this->deptId = $deptId;
  22. $this->apiParas["dept_id"] = $deptId;
  23. }
  24. public function getDeptId()
  25. {
  26. return $this->deptId;
  27. }
  28. public function setLanguage($language)
  29. {
  30. $this->language = $language;
  31. $this->apiParas["language"] = $language;
  32. }
  33. public function getLanguage()
  34. {
  35. return $this->language;
  36. }
  37. public function getApiMethodName()
  38. {
  39. return "dingtalk.oapi.v2.department.get";
  40. }
  41. public function getApiParas()
  42. {
  43. return $this->apiParas;
  44. }
  45. public function check()
  46. {
  47. RequestCheckUtil::checkNotNull($this->deptId,"deptId");
  48. }
  49. public function putOtherTextParam($key, $value) {
  50. $this->apiParas[$key] = $value;
  51. $this->$key = $value;
  52. }
  53. }