TbkItemInfoGetRequest.php 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. <?php
  2. /**
  3. * TOP API: taobao.tbk.item.info.get request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2023.04.24
  7. */
  8. class TbkItemInfoGetRequest
  9. {
  10. /**
  11. * 1-动态ID转链场景,2-消费者比价场景,3-商品库导购场景(不填默认为1)
  12. **/
  13. private $bizSceneId;
  14. /**
  15. * ip地址,影响邮费获取,如果不传或者传入不准确,邮费无法精准提供
  16. **/
  17. private $ip;
  18. /**
  19. * 商品库服务账户(场景id3权限对应的memberid)
  20. **/
  21. private $manageItemPubId;
  22. /**
  23. * 商品ID串,用,分割,最大40个
  24. **/
  25. private $numIids;
  26. /**
  27. * 链接形式:1:PC,2:无线,默认:1
  28. **/
  29. private $platform;
  30. /**
  31. * 1-自购省,2-推广赚(代理模式专属ID,代理模式必填,非代理模式不用填写该字段)
  32. **/
  33. private $promotionType;
  34. /**
  35. * 渠道关系ID
  36. **/
  37. private $relationId;
  38. private $apiParas = array();
  39. public function setBizSceneId($bizSceneId)
  40. {
  41. $this->bizSceneId = $bizSceneId;
  42. $this->apiParas["biz_scene_id"] = $bizSceneId;
  43. }
  44. public function getBizSceneId()
  45. {
  46. return $this->bizSceneId;
  47. }
  48. public function setIp($ip)
  49. {
  50. $this->ip = $ip;
  51. $this->apiParas["ip"] = $ip;
  52. }
  53. public function getIp()
  54. {
  55. return $this->ip;
  56. }
  57. public function setManageItemPubId($manageItemPubId)
  58. {
  59. $this->manageItemPubId = $manageItemPubId;
  60. $this->apiParas["manage_item_pub_id"] = $manageItemPubId;
  61. }
  62. public function getManageItemPubId()
  63. {
  64. return $this->manageItemPubId;
  65. }
  66. public function setNumIids($numIids)
  67. {
  68. $this->numIids = $numIids;
  69. $this->apiParas["num_iids"] = $numIids;
  70. }
  71. public function getNumIids()
  72. {
  73. return $this->numIids;
  74. }
  75. public function setPlatform($platform)
  76. {
  77. $this->platform = $platform;
  78. $this->apiParas["platform"] = $platform;
  79. }
  80. public function getPlatform()
  81. {
  82. return $this->platform;
  83. }
  84. public function setPromotionType($promotionType)
  85. {
  86. $this->promotionType = $promotionType;
  87. $this->apiParas["promotion_type"] = $promotionType;
  88. }
  89. public function getPromotionType()
  90. {
  91. return $this->promotionType;
  92. }
  93. public function setRelationId($relationId)
  94. {
  95. $this->relationId = $relationId;
  96. $this->apiParas["relation_id"] = $relationId;
  97. }
  98. public function getRelationId()
  99. {
  100. return $this->relationId;
  101. }
  102. public function getApiMethodName()
  103. {
  104. return "taobao.tbk.item.info.get";
  105. }
  106. public function getApiParas()
  107. {
  108. return $this->apiParas;
  109. }
  110. public function check()
  111. {
  112. RequestCheckUtil::checkNotNull($this->numIids,"numIids");
  113. }
  114. public function putOtherTextParam($key, $value) {
  115. $this->apiParas[$key] = $value;
  116. $this->$key = $value;
  117. }
  118. }