CustomerAddRequest.php 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <?php
  2. class CustomerAddRequest extends SdkRequest {
  3. const COMPANY_DETAIL = "/v2/customer/add"; // 公司详情接口地址
  4. private $tenantType;
  5. private $companyName; // 公司名称
  6. private $user;
  7. private $alternateContact;
  8. public function getUrl() {
  9. return self::COMPANY_DETAIL;
  10. }
  11. public function getHttpParamers() {
  12. $paramSwitcher = ParamSwitcher::instanceParam();
  13. $paramSwitcher->addParam('tenantType', $this->tenantType);
  14. $paramSwitcher->addParam('companyName', $this->companyName);
  15. $paramSwitcher->addParam('user', $this->user);
  16. $paramSwitcher->addParam('alternateContact', $this->alternateContact);
  17. $httpParameter = HttpParameter::httpPostParamer();
  18. $httpParameter->setJsonParams(json_encode($paramSwitcher->getParams()));
  19. return $httpParameter;
  20. }
  21. /**
  22. * @return mixed
  23. */
  24. public function getTenantType()
  25. {
  26. return $this->tenantType;
  27. }
  28. /**
  29. * @param mixed $tenantType
  30. */
  31. public function setTenantType($tenantType)
  32. {
  33. $this->tenantType = $tenantType;
  34. }
  35. /**
  36. * @return mixed
  37. */
  38. public function getCompanyName()
  39. {
  40. return $this->companyName;
  41. }
  42. /**
  43. * @param mixed $companyName
  44. */
  45. public function setCompanyName($companyName)
  46. {
  47. $this->companyName = $companyName;
  48. }
  49. /**
  50. * @return mixed
  51. */
  52. public function getUser()
  53. {
  54. return $this->user;
  55. }
  56. /**
  57. * @param mixed $user
  58. */
  59. public function setUser($user)
  60. {
  61. $this->user = $user;
  62. }
  63. /**
  64. * @return mixed
  65. */
  66. public function getAlternateContact()
  67. {
  68. return $this->alternateContact;
  69. }
  70. /**
  71. * @param mixed $alternateContact
  72. */
  73. public function setAlternateContact($alternateContact)
  74. {
  75. $this->alternateContact = $alternateContact;
  76. }
  77. }