OpenimRelationsGetRequest.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <?php
  2. /**
  3. * TOP API: taobao.openim.relations.get request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2015.06.17
  7. */
  8. class OpenimRelationsGetRequest
  9. {
  10. /**
  11. * 查询起始日期。格式yyyyMMdd。不得早于一个月
  12. **/
  13. private $begDate;
  14. /**
  15. * 查询结束日期。格式yyyyMMdd。不得早于一个月
  16. **/
  17. private $endDate;
  18. /**
  19. * 用户信息
  20. **/
  21. private $user;
  22. private $apiParas = array();
  23. public function setBegDate($begDate)
  24. {
  25. $this->begDate = $begDate;
  26. $this->apiParas["beg_date"] = $begDate;
  27. }
  28. public function getBegDate()
  29. {
  30. return $this->begDate;
  31. }
  32. public function setEndDate($endDate)
  33. {
  34. $this->endDate = $endDate;
  35. $this->apiParas["end_date"] = $endDate;
  36. }
  37. public function getEndDate()
  38. {
  39. return $this->endDate;
  40. }
  41. public function setUser($user)
  42. {
  43. $this->user = $user;
  44. $this->apiParas["user"] = $user;
  45. }
  46. public function getUser()
  47. {
  48. return $this->user;
  49. }
  50. public function getApiMethodName()
  51. {
  52. return "taobao.openim.relations.get";
  53. }
  54. public function getApiParas()
  55. {
  56. return $this->apiParas;
  57. }
  58. public function check()
  59. {
  60. RequestCheckUtil::checkNotNull($this->begDate,"begDate");
  61. RequestCheckUtil::checkNotNull($this->endDate,"endDate");
  62. }
  63. public function putOtherTextParam($key, $value) {
  64. $this->apiParas[$key] = $value;
  65. $this->$key = $value;
  66. }
  67. }