AlibabaAliqinFcVoiceNumDoublecallRequest.php 3.5 KB

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