优惠券订单及其他脚本

TopAuthTokenCreateRequest.php 990B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?php
  2. /**
  3. * TOP API: taobao.top.auth.token.create request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2018.07.25
  7. */
  8. class TopAuthTokenCreateRequest
  9. {
  10. /**
  11. * 授权code,grantType==authorization_code 时需要
  12. **/
  13. private $code;
  14. /**
  15. * 与生成code的uuid配对
  16. **/
  17. private $uuid;
  18. private $apiParas = array();
  19. public function setCode($code)
  20. {
  21. $this->code = $code;
  22. $this->apiParas["code"] = $code;
  23. }
  24. public function getCode()
  25. {
  26. return $this->code;
  27. }
  28. public function setUuid($uuid)
  29. {
  30. $this->uuid = $uuid;
  31. $this->apiParas["uuid"] = $uuid;
  32. }
  33. public function getUuid()
  34. {
  35. return $this->uuid;
  36. }
  37. public function getApiMethodName()
  38. {
  39. return "taobao.top.auth.token.create";
  40. }
  41. public function getApiParas()
  42. {
  43. return $this->apiParas;
  44. }
  45. public function check()
  46. {
  47. RequestCheckUtil::checkNotNull($this->code,"code");
  48. }
  49. public function putOtherTextParam($key, $value) {
  50. $this->apiParas[$key] = $value;
  51. $this->$key = $value;
  52. }
  53. }