优惠券订单及其他脚本

TbkShopConvertRequest.php 1.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <?php
  2. /**
  3. * TOP API: taobao.tbk.shop.convert request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2018.07.25
  7. */
  8. class TbkShopConvertRequest
  9. {
  10. /**
  11. * 广告位ID,区分效果位置
  12. **/
  13. private $adzoneId;
  14. /**
  15. * 需返回的字段列表
  16. **/
  17. private $fields;
  18. /**
  19. * 链接形式:1:PC,2:无线,默认:1
  20. **/
  21. private $platform;
  22. /**
  23. * 自定义输入串,英文和数字组成,长度不能大于12个字符,区分不同的推广渠道
  24. **/
  25. private $unid;
  26. /**
  27. * 卖家ID串,用','分割,从taobao.tbk.shop.get接口获取user_id字段
  28. **/
  29. private $userIds;
  30. private $apiParas = array();
  31. public function setAdzoneId($adzoneId)
  32. {
  33. $this->adzoneId = $adzoneId;
  34. $this->apiParas["adzone_id"] = $adzoneId;
  35. }
  36. public function getAdzoneId()
  37. {
  38. return $this->adzoneId;
  39. }
  40. public function setFields($fields)
  41. {
  42. $this->fields = $fields;
  43. $this->apiParas["fields"] = $fields;
  44. }
  45. public function getFields()
  46. {
  47. return $this->fields;
  48. }
  49. public function setPlatform($platform)
  50. {
  51. $this->platform = $platform;
  52. $this->apiParas["platform"] = $platform;
  53. }
  54. public function getPlatform()
  55. {
  56. return $this->platform;
  57. }
  58. public function setUnid($unid)
  59. {
  60. $this->unid = $unid;
  61. $this->apiParas["unid"] = $unid;
  62. }
  63. public function getUnid()
  64. {
  65. return $this->unid;
  66. }
  67. public function setUserIds($userIds)
  68. {
  69. $this->userIds = $userIds;
  70. $this->apiParas["user_ids"] = $userIds;
  71. }
  72. public function getUserIds()
  73. {
  74. return $this->userIds;
  75. }
  76. public function getApiMethodName()
  77. {
  78. return "taobao.tbk.shop.convert";
  79. }
  80. public function getApiParas()
  81. {
  82. return $this->apiParas;
  83. }
  84. public function check()
  85. {
  86. RequestCheckUtil::checkNotNull($this->adzoneId,"adzoneId");
  87. RequestCheckUtil::checkNotNull($this->fields,"fields");
  88. RequestCheckUtil::checkNotNull($this->userIds,"userIds");
  89. }
  90. public function putOtherTextParam($key, $value) {
  91. $this->apiParas[$key] = $value;
  92. $this->$key = $value;
  93. }
  94. }