优惠券订单及其他脚本

TopSecretGetRequest.php 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <?php
  2. /**
  3. * TOP API: taobao.top.secret.get request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2018.10.10
  7. */
  8. class TopSecretGetRequest
  9. {
  10. /**
  11. * 自定义用户id
  12. **/
  13. private $customerUserId;
  14. /**
  15. * 伪随机数
  16. **/
  17. private $randomNum;
  18. /**
  19. * 秘钥版本号
  20. **/
  21. private $secretVersion;
  22. private $apiParas = array();
  23. public function setCustomerUserId($customerUserId)
  24. {
  25. $this->customerUserId = $customerUserId;
  26. $this->apiParas["customer_user_id"] = $customerUserId;
  27. }
  28. public function getCustomerUserId()
  29. {
  30. return $this->customerUserId;
  31. }
  32. public function setRandomNum($randomNum)
  33. {
  34. $this->randomNum = $randomNum;
  35. $this->apiParas["random_num"] = $randomNum;
  36. }
  37. public function getRandomNum()
  38. {
  39. return $this->randomNum;
  40. }
  41. public function setSecretVersion($secretVersion)
  42. {
  43. $this->secretVersion = $secretVersion;
  44. $this->apiParas["secret_version"] = $secretVersion;
  45. }
  46. public function getSecretVersion()
  47. {
  48. return $this->secretVersion;
  49. }
  50. public function getApiMethodName()
  51. {
  52. return "taobao.top.secret.get";
  53. }
  54. public function getApiParas()
  55. {
  56. return $this->apiParas;
  57. }
  58. public function check()
  59. {
  60. RequestCheckUtil::checkNotNull($this->randomNum,"randomNum");
  61. }
  62. public function putOtherTextParam($key, $value) {
  63. $this->apiParas[$key] = $value;
  64. $this->$key = $value;
  65. }
  66. }