TopAuthTokenCreateRequest.php 862 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * TOP API: taobao.top.auth.token.create request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2015.08.20
  7. */
  8. class TopAuthTokenCreateRequest {
  9. /**
  10. * 授权code,grantType==authorization_code 时需要
  11. **/
  12. private $code;
  13. private $apiParas = array();
  14. public function setCode($code) {
  15. $this->code = $code;
  16. $this->apiParas["code"] = $code;
  17. }
  18. public function getCode() {
  19. return $this->code;
  20. }
  21. public function getApiMethodName() {
  22. return "taobao.top.auth.token.create";
  23. }
  24. public function getApiParas() {
  25. return $this->apiParas;
  26. }
  27. public function check() {
  28. RequestCheckUtil::checkNotNull($this->code, "code");
  29. }
  30. public function putOtherTextParam($key, $value) {
  31. $this->apiParas[$key] = $value;
  32. $this->$key = $value;
  33. }
  34. }