EmployeeRemoveRequest.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <?php
  2. class EmployeeRemoveRequest extends SdkRequest {
  3. const EMPLOYEE_REMOVE = "/v2/employee/remove"; // 员工移除接口地址
  4. private $user;
  5. private $tenantName;
  6. private $transferEmployee;
  7. public function getUrl() {
  8. return self::EMPLOYEE_REMOVE;
  9. }
  10. public function getHttpParamers() {
  11. $paramSwitcher = ParamSwitcher::instanceParam();
  12. $paramSwitcher->addParam('name', $this->getUser()->getName());
  13. $paramSwitcher->addParam('contact', $this->getUser()->getContact());
  14. $paramSwitcher->addParam('contactType', $this->getUser()->getContactType());
  15. $paramSwitcher->addParam('tenantName', $this->tenantName);
  16. $paramSwitcher->addParam('transferEmployee', $this->transferEmployee);
  17. $httpParameters = HttpParameter::httpPostParamer();
  18. $httpParameters->setJsonParams(json_encode($paramSwitcher->getParams()));
  19. return $httpParameters;
  20. }
  21. /**
  22. * @return mixed
  23. */
  24. public function getUser()
  25. {
  26. return $this->user;
  27. }
  28. /**
  29. * @param mixed $user
  30. */
  31. public function setUser($user)
  32. {
  33. $this->user = $user;
  34. }
  35. /**
  36. * @return mixed
  37. */
  38. public function getTenantName()
  39. {
  40. return $this->tenantName;
  41. }
  42. /**
  43. * @param mixed $tenantName
  44. */
  45. public function setTenantName($tenantName)
  46. {
  47. $this->tenantName = $tenantName;
  48. }
  49. /**
  50. * @return mixed
  51. */
  52. public function getTransferEmployee()
  53. {
  54. return $this->transferEmployee;
  55. }
  56. /**
  57. * @param mixed $transferEmployee
  58. */
  59. public function setTransferEmployee($transferEmployee)
  60. {
  61. $this->transferEmployee = $transferEmployee;
  62. }
  63. }