OapiHealthStepinfoListRequest.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <?php
  2. /**
  3. * dingtalk API: dingtalk.oapi.health.stepinfo.list request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2019.07.03
  7. */
  8. class OapiHealthStepinfoListRequest
  9. {
  10. /**
  11. * 可以传入用户userid或者部门id
  12. **/
  13. private $objectId;
  14. /**
  15. * 时间列表,注意时间格式是YYYYMMDD
  16. **/
  17. private $statDates;
  18. /**
  19. * 0表示取用户步数,1表示取部门步数
  20. **/
  21. private $type;
  22. private $apiParas = array();
  23. public function setObjectId($objectId)
  24. {
  25. $this->objectId = $objectId;
  26. $this->apiParas["object_id"] = $objectId;
  27. }
  28. public function getObjectId()
  29. {
  30. return $this->objectId;
  31. }
  32. public function setStatDates($statDates)
  33. {
  34. $this->statDates = $statDates;
  35. $this->apiParas["stat_dates"] = $statDates;
  36. }
  37. public function getStatDates()
  38. {
  39. return $this->statDates;
  40. }
  41. public function setType($type)
  42. {
  43. $this->type = $type;
  44. $this->apiParas["type"] = $type;
  45. }
  46. public function getType()
  47. {
  48. return $this->type;
  49. }
  50. public function getApiMethodName()
  51. {
  52. return "dingtalk.oapi.health.stepinfo.list";
  53. }
  54. public function getApiParas()
  55. {
  56. return $this->apiParas;
  57. }
  58. public function check()
  59. {
  60. RequestCheckUtil::checkNotNull($this->objectId,"objectId");
  61. RequestCheckUtil::checkNotNull($this->statDates,"statDates");
  62. RequestCheckUtil::checkMaxListSize($this->statDates,31,"statDates");
  63. RequestCheckUtil::checkNotNull($this->type,"type");
  64. }
  65. public function putOtherTextParam($key, $value) {
  66. $this->apiParas[$key] = $value;
  67. $this->$key = $value;
  68. }
  69. }