AlibabaAliqinFcFlowChargeRequest.php 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <?php
  2. /**
  3. * TOP API: alibaba.aliqin.fc.flow.charge request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2017.06.23
  7. */
  8. class AlibabaAliqinFcFlowChargeRequest
  9. {
  10. /**
  11. * 需要充值的流量
  12. **/
  13. private $grade;
  14. /**
  15. * 当scope=0时,is_province=true为指定分省通道。默认值为false
  16. **/
  17. private $isProvince;
  18. /**
  19. * 唯一流水号
  20. **/
  21. private $outRechargeId;
  22. /**
  23. * 手机号
  24. **/
  25. private $phoneNum;
  26. /**
  27. * 充值原因
  28. **/
  29. private $reason;
  30. /**
  31. * 0:全国漫游流量 1:省内流量。不填默认值为0
  32. **/
  33. private $scope;
  34. private $apiParas = array();
  35. public function setGrade($grade)
  36. {
  37. $this->grade = $grade;
  38. $this->apiParas["grade"] = $grade;
  39. }
  40. public function getGrade()
  41. {
  42. return $this->grade;
  43. }
  44. public function setIsProvince($isProvince)
  45. {
  46. $this->isProvince = $isProvince;
  47. $this->apiParas["is_province"] = $isProvince;
  48. }
  49. public function getIsProvince()
  50. {
  51. return $this->isProvince;
  52. }
  53. public function setOutRechargeId($outRechargeId)
  54. {
  55. $this->outRechargeId = $outRechargeId;
  56. $this->apiParas["out_recharge_id"] = $outRechargeId;
  57. }
  58. public function getOutRechargeId()
  59. {
  60. return $this->outRechargeId;
  61. }
  62. public function setPhoneNum($phoneNum)
  63. {
  64. $this->phoneNum = $phoneNum;
  65. $this->apiParas["phone_num"] = $phoneNum;
  66. }
  67. public function getPhoneNum()
  68. {
  69. return $this->phoneNum;
  70. }
  71. public function setReason($reason)
  72. {
  73. $this->reason = $reason;
  74. $this->apiParas["reason"] = $reason;
  75. }
  76. public function getReason()
  77. {
  78. return $this->reason;
  79. }
  80. public function setScope($scope)
  81. {
  82. $this->scope = $scope;
  83. $this->apiParas["scope"] = $scope;
  84. }
  85. public function getScope()
  86. {
  87. return $this->scope;
  88. }
  89. public function getApiMethodName()
  90. {
  91. return "alibaba.aliqin.fc.flow.charge";
  92. }
  93. public function getApiParas()
  94. {
  95. return $this->apiParas;
  96. }
  97. public function check()
  98. {
  99. RequestCheckUtil::checkNotNull($this->grade,"grade");
  100. RequestCheckUtil::checkNotNull($this->outRechargeId,"outRechargeId");
  101. RequestCheckUtil::checkNotNull($this->phoneNum,"phoneNum");
  102. }
  103. public function putOtherTextParam($key, $value) {
  104. $this->apiParas[$key] = $value;
  105. $this->$key = $value;
  106. }
  107. }