Nav apraksta

TbkScInvitecodeGetRequest.php 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <?php
  2. /**
  3. * TOP API: taobao.tbk.sc.invitecode.get request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2018.08.28
  7. */
  8. class TbkScInvitecodeGetRequest
  9. {
  10. /**
  11. * 邀请码类型,1 - 渠道邀请,2 - 渠道裂变,3 -会员邀请
  12. **/
  13. private $codeType;
  14. /**
  15. * 渠道推广的物料类型
  16. **/
  17. private $relationApp;
  18. /**
  19. * 渠道关系ID
  20. **/
  21. private $relationId;
  22. private $apiParas = array();
  23. public function setCodeType($codeType)
  24. {
  25. $this->codeType = $codeType;
  26. $this->apiParas["code_type"] = $codeType;
  27. }
  28. public function getCodeType()
  29. {
  30. return $this->codeType;
  31. }
  32. public function setRelationApp($relationApp)
  33. {
  34. $this->relationApp = $relationApp;
  35. $this->apiParas["relation_app"] = $relationApp;
  36. }
  37. public function getRelationApp()
  38. {
  39. return $this->relationApp;
  40. }
  41. public function setRelationId($relationId)
  42. {
  43. $this->relationId = $relationId;
  44. $this->apiParas["relation_id"] = $relationId;
  45. }
  46. public function getRelationId()
  47. {
  48. return $this->relationId;
  49. }
  50. public function getApiMethodName()
  51. {
  52. return "taobao.tbk.sc.invitecode.get";
  53. }
  54. public function getApiParas()
  55. {
  56. return $this->apiParas;
  57. }
  58. public function check()
  59. {
  60. RequestCheckUtil::checkNotNull($this->codeType,"codeType");
  61. RequestCheckUtil::checkNotNull($this->relationApp,"relationApp");
  62. }
  63. public function putOtherTextParam($key, $value) {
  64. $this->apiParas[$key] = $value;
  65. $this->$key = $value;
  66. }
  67. }