SmartworkAttendsGetleaveapprovedurationRequest.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <?php
  2. /**
  3. * dingtalk API: dingtalk.smartwork.attends.getleaveapproveduration request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2019.07.03
  7. */
  8. class SmartworkAttendsGetleaveapprovedurationRequest
  9. {
  10. /**
  11. * 请假开始时间
  12. **/
  13. private $fromDate;
  14. /**
  15. * 请假结束时间
  16. **/
  17. private $toDate;
  18. /**
  19. * 员工在企业内的UserID,企业用来唯一标识用户的字段。
  20. **/
  21. private $userid;
  22. private $apiParas = array();
  23. public function setFromDate($fromDate)
  24. {
  25. $this->fromDate = $fromDate;
  26. $this->apiParas["from_date"] = $fromDate;
  27. }
  28. public function getFromDate()
  29. {
  30. return $this->fromDate;
  31. }
  32. public function setToDate($toDate)
  33. {
  34. $this->toDate = $toDate;
  35. $this->apiParas["to_date"] = $toDate;
  36. }
  37. public function getToDate()
  38. {
  39. return $this->toDate;
  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.smartwork.attends.getleaveapproveduration";
  53. }
  54. public function getApiParas()
  55. {
  56. return $this->apiParas;
  57. }
  58. public function check()
  59. {
  60. RequestCheckUtil::checkNotNull($this->fromDate,"fromDate");
  61. RequestCheckUtil::checkNotNull($this->toDate,"toDate");
  62. RequestCheckUtil::checkNotNull($this->userid,"userid");
  63. }
  64. public function putOtherTextParam($key, $value) {
  65. $this->apiParas[$key] = $value;
  66. $this->$key = $value;
  67. }
  68. }