OapiV2UserGetbymobileRequest.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?php
  2. /**
  3. * dingtalk API: dingtalk.oapi.v2.user.getbymobile request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2022.01.17
  7. */
  8. class OapiV2UserGetbymobileRequest
  9. {
  10. /**
  11. * 手机号
  12. **/
  13. private $mobile;
  14. /**
  15. * 支持通过手机号搜索专属帐号(不含其他组织创建的专属帐号)
  16. **/
  17. private $supportExclusiveAccountSearch;
  18. private $apiParas = array();
  19. public function setMobile($mobile)
  20. {
  21. $this->mobile = $mobile;
  22. $this->apiParas["mobile"] = $mobile;
  23. }
  24. public function getMobile()
  25. {
  26. return $this->mobile;
  27. }
  28. public function setSupportExclusiveAccountSearch($supportExclusiveAccountSearch)
  29. {
  30. $this->supportExclusiveAccountSearch = $supportExclusiveAccountSearch;
  31. $this->apiParas["support_exclusive_account_search"] = $supportExclusiveAccountSearch;
  32. }
  33. public function getSupportExclusiveAccountSearch()
  34. {
  35. return $this->supportExclusiveAccountSearch;
  36. }
  37. public function getApiMethodName()
  38. {
  39. return "dingtalk.oapi.v2.user.getbymobile";
  40. }
  41. public function getApiParas()
  42. {
  43. return $this->apiParas;
  44. }
  45. public function check()
  46. {
  47. RequestCheckUtil::checkNotNull($this->mobile,"mobile");
  48. RequestCheckUtil::checkMaxLength($this->mobile,15,"mobile");
  49. }
  50. public function putOtherTextParam($key, $value) {
  51. $this->apiParas[$key] = $value;
  52. $this->$key = $value;
  53. }
  54. }