OapiCallBackUpdateCallBackRequest.php 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <?php
  2. /**
  3. * dingtalk API: dingtalk.oapi.call_back.update_call_back request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2018.07.25
  7. */
  8. class OapiCallBackUpdateCallBackRequest
  9. {
  10. /**
  11. * 数据加密密钥。用于回调数据的加密,长度固定为43个字符,从a-z, A-Z, 0-9共62个字符中选取,您可以随机生成,ISV(服务提供商)推荐使用注册套件时填写的EncodingAESKey
  12. **/
  13. private $aesKey;
  14. /**
  15. * 需要监听的事件类型,有20种,“user_add_org”, “user_modify_org”, “user_leave_org”,“org_admin_add”, “org_admin_remove”, “org_dept_create”, “org_dept_modify”, “org_dept_remove”, “org_remove”, “chat_add_member”, “chat_remove_member”, “chat_quit”, “chat_update_owner”, “chat_update_title”, “chat_disband”, “chat_disband_microapp”, “check_in”,“bpms_task_change”,“bpms_instance_change”,,“label_user_change”,“label_conf_add”, “label_conf_modify”,“label_conf_del”,
  16. **/
  17. private $callBackTag;
  18. /**
  19. * 加解密需要用到的token,ISV(服务提供商)推荐使用注册套件时填写的token,普通企业可以随机填写
  20. **/
  21. private $token;
  22. /**
  23. * 更新事件回调接口
  24. **/
  25. private $url;
  26. private $apiParas = array();
  27. public function setAesKey($aesKey)
  28. {
  29. $this->aesKey = $aesKey;
  30. $this->apiParas["aes_key"] = $aesKey;
  31. }
  32. public function getAesKey()
  33. {
  34. return $this->aesKey;
  35. }
  36. public function setCallBackTag($callBackTag)
  37. {
  38. $this->callBackTag = $callBackTag;
  39. $this->apiParas["call_back_tag"] = $callBackTag;
  40. }
  41. public function getCallBackTag()
  42. {
  43. return $this->callBackTag;
  44. }
  45. public function setToken($token)
  46. {
  47. $this->token = $token;
  48. $this->apiParas["token"] = $token;
  49. }
  50. public function getToken()
  51. {
  52. return $this->token;
  53. }
  54. public function setUrl($url)
  55. {
  56. $this->url = $url;
  57. $this->apiParas["url"] = $url;
  58. }
  59. public function getUrl()
  60. {
  61. return $this->url;
  62. }
  63. public function getApiMethodName()
  64. {
  65. return "dingtalk.oapi.call_back.update_call_back";
  66. }
  67. public function getApiParas()
  68. {
  69. return $this->apiParas;
  70. }
  71. public function check()
  72. {
  73. RequestCheckUtil::checkMaxListSize($this->callBackTag,20,"callBackTag");
  74. }
  75. public function putOtherTextParam($key, $value) {
  76. $this->apiParas[$key] = $value;
  77. $this->$key = $value;
  78. }
  79. }