优惠券订单及其他脚本

TbkActivitylinkGetRequest.php 2.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <?php
  2. /**
  3. * TOP API: taobao.tbk.activitylink.get request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2019.01.18
  7. */
  8. class TbkActivitylinkGetRequest
  9. {
  10. /**
  11. * 推广位id,mm_xx_xx_xx pid三段式中的第三段
  12. **/
  13. private $adzoneId;
  14. /**
  15. * 1:PC,2:无线,默认:1
  16. **/
  17. private $platform;
  18. /**
  19. * 渠道关系ID,仅适用于渠道推广场景
  20. **/
  21. private $relationId;
  22. /**
  23. * 需要转链的活动页URL,需从官方活动页获取。打开“联盟产品”-“官方活动推广”-“淘宝/天猫”页,在活动名称上右单击,复制链接。(一定要直接复制,完全相同才可转链,不要打开页面后复制、不要复制“立即推广”按钮转链后的URL)
  24. **/
  25. private $srcUrl;
  26. /**
  27. * 媒体平台下达人的淘客pid
  28. **/
  29. private $subPid;
  30. /**
  31. * 自定义输入串,英文和数字组成,长度不能大于12个字符,区分不同的推广渠道
  32. **/
  33. private $unionId;
  34. private $apiParas = array();
  35. public function setAdzoneId($adzoneId)
  36. {
  37. $this->adzoneId = $adzoneId;
  38. $this->apiParas["adzone_id"] = $adzoneId;
  39. }
  40. public function getAdzoneId()
  41. {
  42. return $this->adzoneId;
  43. }
  44. public function setPlatform($platform)
  45. {
  46. $this->platform = $platform;
  47. $this->apiParas["platform"] = $platform;
  48. }
  49. public function getPlatform()
  50. {
  51. return $this->platform;
  52. }
  53. public function setRelationId($relationId)
  54. {
  55. $this->relationId = $relationId;
  56. $this->apiParas["relation_id"] = $relationId;
  57. }
  58. public function getRelationId()
  59. {
  60. return $this->relationId;
  61. }
  62. public function setSrcUrl($srcUrl)
  63. {
  64. $this->srcUrl = $srcUrl;
  65. $this->apiParas["src_url"] = $srcUrl;
  66. }
  67. public function getSrcUrl()
  68. {
  69. return $this->srcUrl;
  70. }
  71. public function setSubPid($subPid)
  72. {
  73. $this->subPid = $subPid;
  74. $this->apiParas["sub_pid"] = $subPid;
  75. }
  76. public function getSubPid()
  77. {
  78. return $this->subPid;
  79. }
  80. public function setUnionId($unionId)
  81. {
  82. $this->unionId = $unionId;
  83. $this->apiParas["union_id"] = $unionId;
  84. }
  85. public function getUnionId()
  86. {
  87. return $this->unionId;
  88. }
  89. public function getApiMethodName()
  90. {
  91. return "taobao.tbk.activitylink.get";
  92. }
  93. public function getApiParas()
  94. {
  95. return $this->apiParas;
  96. }
  97. public function check()
  98. {
  99. RequestCheckUtil::checkNotNull($this->adzoneId,"adzoneId");
  100. RequestCheckUtil::checkNotNull($this->srcUrl,"srcUrl");
  101. }
  102. public function putOtherTextParam($key, $value) {
  103. $this->apiParas[$key] = $value;
  104. $this->$key = $value;
  105. }
  106. }