AlibabaAliqinFcVoiceNumDoublecallRequest.php 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <?php
  2. /**
  3. * TOP API: alibaba.aliqin.fc.voice.num.doublecall request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2016.03.06
  7. */
  8. class AlibabaAliqinFcVoiceNumDoublecallRequest
  9. {
  10. /**
  11. * 被叫号码,支持国内手机号与固话号码,格式如下057188773344,13911112222,4001112222,95500
  12. **/
  13. private $calledNum;
  14. /**
  15. * 被叫号码侧的号码显示,传入的显示号码可以是阿里大鱼“管理中心-号码管理”中申请通过的号码。显示号码格式如下057188773344,4001112222,95500。显示号码也可以为主叫号码。
  16. **/
  17. private $calledShowNum;
  18. /**
  19. * 主叫号码,支持国内手机号与固话号码,格式如下057188773344,13911112222,4001112222,95500
  20. **/
  21. private $callerNum;
  22. /**
  23. * 主叫号码侧的号码显示,传入的显示号码必须是阿里大鱼“管理中心-号码管理”中申请通过的号码。显示号码格式如下057188773344,4001112222,95500
  24. **/
  25. private $callerShowNum;
  26. /**
  27. * 公共回传参数,在“消息返回”中会透传回该参数;举例:用户可以传入自己下级的会员ID,在消息返回时,该会员ID会包含在内,用户可以根据该会员ID识别是哪位会员使用了你的应用
  28. **/
  29. private $extend;
  30. /**
  31. * 通话超时时长,如接通后到达120秒时,通话会因为超时自动挂断。若无需设置超时时长,可不传。
  32. **/
  33. private $sessionTimeOut;
  34. private $apiParas = array();
  35. public function setCalledNum($calledNum)
  36. {
  37. $this->calledNum = $calledNum;
  38. $this->apiParas["called_num"] = $calledNum;
  39. }
  40. public function getCalledNum()
  41. {
  42. return $this->calledNum;
  43. }
  44. public function setCalledShowNum($calledShowNum)
  45. {
  46. $this->calledShowNum = $calledShowNum;
  47. $this->apiParas["called_show_num"] = $calledShowNum;
  48. }
  49. public function getCalledShowNum()
  50. {
  51. return $this->calledShowNum;
  52. }
  53. public function setCallerNum($callerNum)
  54. {
  55. $this->callerNum = $callerNum;
  56. $this->apiParas["caller_num"] = $callerNum;
  57. }
  58. public function getCallerNum()
  59. {
  60. return $this->callerNum;
  61. }
  62. public function setCallerShowNum($callerShowNum)
  63. {
  64. $this->callerShowNum = $callerShowNum;
  65. $this->apiParas["caller_show_num"] = $callerShowNum;
  66. }
  67. public function getCallerShowNum()
  68. {
  69. return $this->callerShowNum;
  70. }
  71. public function setExtend($extend)
  72. {
  73. $this->extend = $extend;
  74. $this->apiParas["extend"] = $extend;
  75. }
  76. public function getExtend()
  77. {
  78. return $this->extend;
  79. }
  80. public function setSessionTimeOut($sessionTimeOut)
  81. {
  82. $this->sessionTimeOut = $sessionTimeOut;
  83. $this->apiParas["session_time_out"] = $sessionTimeOut;
  84. }
  85. public function getSessionTimeOut()
  86. {
  87. return $this->sessionTimeOut;
  88. }
  89. public function getApiMethodName()
  90. {
  91. return "alibaba.aliqin.fc.voice.num.doublecall";
  92. }
  93. public function getApiParas()
  94. {
  95. return $this->apiParas;
  96. }
  97. public function check()
  98. {
  99. RequestCheckUtil::checkNotNull($this->calledNum,"calledNum");
  100. RequestCheckUtil::checkNotNull($this->calledShowNum,"calledShowNum");
  101. RequestCheckUtil::checkNotNull($this->callerNum,"callerNum");
  102. RequestCheckUtil::checkNotNull($this->callerShowNum,"callerShowNum");
  103. }
  104. public function putOtherTextParam($key, $value) {
  105. $this->apiParas[$key] = $value;
  106. $this->$key = $value;
  107. }
  108. }