OapiAtsJobQueryRequest.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <?php
  2. /**
  3. * dingtalk API: dingtalk.oapi.ats.job.query request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2021.02.26
  7. */
  8. class OapiAtsJobQueryRequest
  9. {
  10. /**
  11. * 招聘业务标识
  12. **/
  13. private $bizCode;
  14. /**
  15. * 分页游标,传空时默认为第一页
  16. **/
  17. private $cursor;
  18. /**
  19. * 查询参数
  20. **/
  21. private $queryParam;
  22. /**
  23. * 分页大小,最大200
  24. **/
  25. private $size;
  26. private $apiParas = array();
  27. public function setBizCode($bizCode)
  28. {
  29. $this->bizCode = $bizCode;
  30. $this->apiParas["biz_code"] = $bizCode;
  31. }
  32. public function getBizCode()
  33. {
  34. return $this->bizCode;
  35. }
  36. public function setCursor($cursor)
  37. {
  38. $this->cursor = $cursor;
  39. $this->apiParas["cursor"] = $cursor;
  40. }
  41. public function getCursor()
  42. {
  43. return $this->cursor;
  44. }
  45. public function setQueryParam($queryParam)
  46. {
  47. $this->queryParam = $queryParam;
  48. $this->apiParas["query_param"] = $queryParam;
  49. }
  50. public function getQueryParam()
  51. {
  52. return $this->queryParam;
  53. }
  54. public function setSize($size)
  55. {
  56. $this->size = $size;
  57. $this->apiParas["size"] = $size;
  58. }
  59. public function getSize()
  60. {
  61. return $this->size;
  62. }
  63. public function getApiMethodName()
  64. {
  65. return "dingtalk.oapi.ats.job.query";
  66. }
  67. public function getApiParas()
  68. {
  69. return $this->apiParas;
  70. }
  71. public function check()
  72. {
  73. RequestCheckUtil::checkNotNull($this->bizCode,"bizCode");
  74. RequestCheckUtil::checkNotNull($this->size,"size");
  75. RequestCheckUtil::checkMaxValue($this->size,200,"size");
  76. }
  77. public function putOtherTextParam($key, $value) {
  78. $this->apiParas[$key] = $value;
  79. $this->$key = $value;
  80. }
  81. }