AlibabaAliqinFcVoiceNumSinglecallRequest.php 2.4 KB

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