优惠券订单及其他脚本

TbkItemConvertRequest.php 2.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <?php
  2. /**
  3. * TOP API: taobao.tbk.item.convert request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2018.07.25
  7. */
  8. class TbkItemConvertRequest
  9. {
  10. /**
  11. * 广告位ID,区分效果位置
  12. **/
  13. private $adzoneId;
  14. /**
  15. * 1表示商品转通用计划链接,其他值或不传表示转营销计划链接
  16. **/
  17. private $dx;
  18. /**
  19. * 需返回的字段列表
  20. **/
  21. private $fields;
  22. /**
  23. * 商品ID串,用','分割,从taobao.tbk.item.get接口获取num_iid字段,最大40个
  24. **/
  25. private $numIids;
  26. /**
  27. * 链接形式:1:PC,2:无线,默认:1
  28. **/
  29. private $platform;
  30. /**
  31. * 自定义输入串,英文和数字组成,长度不能大于12个字符,区分不同的推广渠道
  32. **/
  33. private $unid;
  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 setDx($dx)
  45. {
  46. $this->dx = $dx;
  47. $this->apiParas["dx"] = $dx;
  48. }
  49. public function getDx()
  50. {
  51. return $this->dx;
  52. }
  53. public function setFields($fields)
  54. {
  55. $this->fields = $fields;
  56. $this->apiParas["fields"] = $fields;
  57. }
  58. public function getFields()
  59. {
  60. return $this->fields;
  61. }
  62. public function setNumIids($numIids)
  63. {
  64. $this->numIids = $numIids;
  65. $this->apiParas["num_iids"] = $numIids;
  66. }
  67. public function getNumIids()
  68. {
  69. return $this->numIids;
  70. }
  71. public function setPlatform($platform)
  72. {
  73. $this->platform = $platform;
  74. $this->apiParas["platform"] = $platform;
  75. }
  76. public function getPlatform()
  77. {
  78. return $this->platform;
  79. }
  80. public function setUnid($unid)
  81. {
  82. $this->unid = $unid;
  83. $this->apiParas["unid"] = $unid;
  84. }
  85. public function getUnid()
  86. {
  87. return $this->unid;
  88. }
  89. public function getApiMethodName()
  90. {
  91. return "taobao.tbk.item.convert";
  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->fields,"fields");
  101. RequestCheckUtil::checkNotNull($this->numIids,"numIids");
  102. }
  103. public function putOtherTextParam($key, $value) {
  104. $this->apiParas[$key] = $value;
  105. $this->$key = $value;
  106. }
  107. }