OapiCspaceAuthUpdateRequest.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <?php
  2. /**
  3. * dingtalk API: dingtalk.oapi.cspace.auth.update request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2019.10.08
  7. */
  8. class OapiCspaceAuthUpdateRequest
  9. {
  10. /**
  11. * 微应用的agentId
  12. **/
  13. private $agentId;
  14. /**
  15. * 授权码有效期,单位为日,为空则表示永久授权
  16. **/
  17. private $duration;
  18. /**
  19. * isv授权码
  20. **/
  21. private $isvCode;
  22. private $apiParas = array();
  23. public function setAgentId($agentId)
  24. {
  25. $this->agentId = $agentId;
  26. $this->apiParas["agent_id"] = $agentId;
  27. }
  28. public function getAgentId()
  29. {
  30. return $this->agentId;
  31. }
  32. public function setDuration($duration)
  33. {
  34. $this->duration = $duration;
  35. $this->apiParas["duration"] = $duration;
  36. }
  37. public function getDuration()
  38. {
  39. return $this->duration;
  40. }
  41. public function setIsvCode($isvCode)
  42. {
  43. $this->isvCode = $isvCode;
  44. $this->apiParas["isv_code"] = $isvCode;
  45. }
  46. public function getIsvCode()
  47. {
  48. return $this->isvCode;
  49. }
  50. public function getApiMethodName()
  51. {
  52. return "dingtalk.oapi.cspace.auth.update";
  53. }
  54. public function getApiParas()
  55. {
  56. return $this->apiParas;
  57. }
  58. public function check()
  59. {
  60. RequestCheckUtil::checkNotNull($this->agentId,"agentId");
  61. RequestCheckUtil::checkNotNull($this->isvCode,"isvCode");
  62. }
  63. public function putOtherTextParam($key, $value) {
  64. $this->apiParas[$key] = $value;
  65. $this->$key = $value;
  66. }
  67. }