SaasPrivilegeUrlRequest.php 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. <?php
  2. class SaasPrivilegeUrlRequest extends SdkRequest {
  3. const REQUEST_URL = "/saas/v2/privilege/url";
  4. private $appId;
  5. private $companyId;
  6. private $user;
  7. private $createToken;
  8. private $successUrl;
  9. private $callbackUrl;
  10. private $privilegeModules;
  11. public function getUrl() {
  12. return self::REQUEST_URL;
  13. }
  14. public function getHttpParamers() {
  15. $paramSwitcher = ParamSwitcher::instanceParam();
  16. $paramSwitcher->addParam('appId', $this->appId);
  17. $paramSwitcher->addParam('companyId', $this->companyId);
  18. $paramSwitcher->addParam('user', $this->user);
  19. $paramSwitcher->addParam('createToken',$this->createToken);
  20. $paramSwitcher->addParam('successUrl',$this->successUrl);
  21. $paramSwitcher->addParam('callbackUrl',$this->callbackUrl);
  22. $paramSwitcher->addParam('privilegeModules',$this->privilegeModules);
  23. $httpParameters = HttpParameter::httpPostParamer();
  24. $httpParameters->setJsonParams(json_encode($paramSwitcher->getParams()));
  25. return $httpParameters;
  26. }
  27. /**
  28. * @return mixed
  29. */
  30. public function getAppId()
  31. {
  32. return $this->appId;
  33. }
  34. /**
  35. * @param mixed $appId
  36. */
  37. public function setAppId($appId)
  38. {
  39. $this->appId = $appId;
  40. }
  41. /**
  42. * @return mixed
  43. */
  44. public function getCompanyId()
  45. {
  46. return $this->companyId;
  47. }
  48. /**
  49. * @param mixed $companyId
  50. */
  51. public function setCompanyId($companyId)
  52. {
  53. $this->companyId = $companyId;
  54. }
  55. /**
  56. * @return mixed
  57. */
  58. public function getUser()
  59. {
  60. return $this->user;
  61. }
  62. /**
  63. * @param mixed $user
  64. */
  65. public function setUser($user)
  66. {
  67. $this->user = $user;
  68. }
  69. /**
  70. * @return mixed
  71. */
  72. public function getCreateToken()
  73. {
  74. return $this->createToken;
  75. }
  76. /**
  77. * @param mixed $createToken
  78. */
  79. public function setCreateToken($createToken)
  80. {
  81. $this->createToken = $createToken;
  82. }
  83. /**
  84. * @return mixed
  85. */
  86. public function getSuccessUrl()
  87. {
  88. return $this->successUrl;
  89. }
  90. /**
  91. * @param mixed $successUrl
  92. */
  93. public function setSuccessUrl($successUrl)
  94. {
  95. $this->successUrl = $successUrl;
  96. }
  97. /**
  98. * @return mixed
  99. */
  100. public function getCallbackUrl()
  101. {
  102. return $this->callbackUrl;
  103. }
  104. /**
  105. * @param mixed $callbackUrl
  106. */
  107. public function setCallbackUrl($callbackUrl)
  108. {
  109. $this->callbackUrl = $callbackUrl;
  110. }
  111. /**
  112. * @return mixed
  113. */
  114. public function getPrivilegeModules()
  115. {
  116. return $this->privilegeModules;
  117. }
  118. /**
  119. * @param mixed $privilegeModules
  120. */
  121. public function setPrivilegeModules($privilegeModules)
  122. {
  123. $this->privilegeModules = $privilegeModules;
  124. }
  125. }