AlibabaAliqinFcVoiceNumSinglecallRequest.php 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <?php
  2. /**
  3. * TOP API: alibaba.aliqin.fc.voice.num.singlecall request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2016.03.01
  7. */
  8. class AlibabaAliqinFcVoiceNumSinglecallRequest
  9. {
  10. /**
  11. * 被叫号码,支持国内手机号与固话号码,格式如下057188773344,13911112222,4001112222,95500
  12. **/
  13. private $calledNum;
  14. /**
  15. * 被叫号显,传入的显示号码必须是阿里大鱼“管理中心-号码管理”中申请通过的号码
  16. **/
  17. private $calledShowNum;
  18. /**
  19. * 公共回传参数,在“消息返回”中会透传回该参数;举例:用户可以传入自己下级的会员ID,在消息返回时,该会员ID会包含在内,用户可以根据该会员ID识别是哪位会员使用了你的应用
  20. **/
  21. private $extend;
  22. /**
  23. * 语音文件ID,传入的语音文件必须是在阿里大鱼“管理中心-语音文件管理”中的可用语音文件
  24. **/
  25. private $voiceCode;
  26. private $apiParas = array();
  27. public function setCalledNum($calledNum)
  28. {
  29. $this->calledNum = $calledNum;
  30. $this->apiParas["called_num"] = $calledNum;
  31. }
  32. public function getCalledNum()
  33. {
  34. return $this->calledNum;
  35. }
  36. public function setCalledShowNum($calledShowNum)
  37. {
  38. $this->calledShowNum = $calledShowNum;
  39. $this->apiParas["called_show_num"] = $calledShowNum;
  40. }
  41. public function getCalledShowNum()
  42. {
  43. return $this->calledShowNum;
  44. }
  45. public function setExtend($extend)
  46. {
  47. $this->extend = $extend;
  48. $this->apiParas["extend"] = $extend;
  49. }
  50. public function getExtend()
  51. {
  52. return $this->extend;
  53. }
  54. public function setVoiceCode($voiceCode)
  55. {
  56. $this->voiceCode = $voiceCode;
  57. $this->apiParas["voice_code"] = $voiceCode;
  58. }
  59. public function getVoiceCode()
  60. {
  61. return $this->voiceCode;
  62. }
  63. public function getApiMethodName()
  64. {
  65. return "alibaba.aliqin.fc.voice.num.singlecall";
  66. }
  67. public function getApiParas()
  68. {
  69. return $this->apiParas;
  70. }
  71. public function check()
  72. {
  73. RequestCheckUtil::checkNotNull($this->calledNum,"calledNum");
  74. RequestCheckUtil::checkNotNull($this->calledShowNum,"calledShowNum");
  75. RequestCheckUtil::checkNotNull($this->voiceCode,"voiceCode");
  76. }
  77. public function putOtherTextParam($key, $value) {
  78. $this->apiParas[$key] = $value;
  79. $this->$key = $value;
  80. }
  81. }