PddDdkGoodsSearchRequest.php 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  1. <?php
  2. namespace Com\Pdd\Pop\Sdk\Api\Request;
  3. use Com\Pdd\Pop\Sdk\PopBaseHttpRequest;
  4. use Com\Pdd\Pop\Sdk\PopBaseJsonEntity;
  5. class PddDdkGoodsSearchRequest extends PopBaseHttpRequest
  6. {
  7. public function __construct()
  8. {
  9. }
  10. /**
  11. * @JsonProperty(List<Integer>, "activity_tags")
  12. */
  13. private $activityTags;
  14. /**
  15. * @JsonProperty(Long, "cat_id")
  16. */
  17. private $catId;
  18. /**
  19. * @JsonProperty(String, "custom_parameters")
  20. */
  21. private $customParameters;
  22. /**
  23. * @JsonProperty(List<Long>, "goods_id_list")
  24. */
  25. private $goodsIdList;
  26. /**
  27. * @JsonProperty(Boolean, "is_brand_goods")
  28. */
  29. private $isBrandGoods;
  30. /**
  31. * @JsonProperty(String, "keyword")
  32. */
  33. private $keyword;
  34. /**
  35. * @JsonProperty(String, "list_id")
  36. */
  37. private $listId;
  38. /**
  39. * @JsonProperty(Integer, "merchant_type")
  40. */
  41. private $merchantType;
  42. /**
  43. * @JsonProperty(List<Integer>, "merchant_type_list")
  44. */
  45. private $merchantTypeList;
  46. /**
  47. * @JsonProperty(Long, "opt_id")
  48. */
  49. private $optId;
  50. /**
  51. * @JsonProperty(Integer, "page")
  52. */
  53. private $page;
  54. /**
  55. * @JsonProperty(Integer, "page_size")
  56. */
  57. private $pageSize;
  58. /**
  59. * @JsonProperty(String, "pid")
  60. */
  61. private $pid;
  62. /**
  63. * @JsonProperty(List<\Com\Pdd\Pop\Sdk\Api\Request\PddDdkGoodsSearchRequest_RangeListItem>, "range_list")
  64. */
  65. private $rangeList;
  66. /**
  67. * @JsonProperty(Integer, "sort_type")
  68. */
  69. private $sortType;
  70. /**
  71. * @JsonProperty(Boolean, "with_coupon")
  72. */
  73. private $withCoupon;
  74. /**
  75. * @JsonProperty(List<Integer>, "block_cats")
  76. */
  77. private $blockCats;
  78. /**
  79. * @JsonProperty(List<Integer>, "block_cat_packages")
  80. */
  81. private $blockCatPackages;
  82. protected function setUserParams(&$params)
  83. {
  84. $this->setUserParam($params, "activity_tags", $this->activityTags);
  85. $this->setUserParam($params, "cat_id", $this->catId);
  86. $this->setUserParam($params, "custom_parameters", $this->customParameters);
  87. $this->setUserParam($params, "goods_id_list", $this->goodsIdList);
  88. $this->setUserParam($params, "is_brand_goods", $this->isBrandGoods);
  89. $this->setUserParam($params, "keyword", $this->keyword);
  90. $this->setUserParam($params, "list_id", $this->listId);
  91. $this->setUserParam($params, "merchant_type", $this->merchantType);
  92. $this->setUserParam($params, "merchant_type_list", $this->merchantTypeList);
  93. $this->setUserParam($params, "opt_id", $this->optId);
  94. $this->setUserParam($params, "page", $this->page);
  95. $this->setUserParam($params, "page_size", $this->pageSize);
  96. $this->setUserParam($params, "pid", $this->pid);
  97. $this->setUserParam($params, "range_list", $this->rangeList);
  98. $this->setUserParam($params, "sort_type", $this->sortType);
  99. $this->setUserParam($params, "with_coupon", $this->withCoupon);
  100. $this->setUserParam($params, "block_cats", $this->blockCats);
  101. $this->setUserParam($params, "block_cat_packages", $this->blockCatPackages);
  102. }
  103. public function getVersion()
  104. {
  105. return "V1";
  106. }
  107. public function getDataType()
  108. {
  109. return "JSON";
  110. }
  111. public function getType()
  112. {
  113. return "pdd.ddk.goods.search";
  114. }
  115. public function setActivityTags($activityTags)
  116. {
  117. $this->activityTags = $activityTags;
  118. }
  119. public function setCatId($catId)
  120. {
  121. $this->catId = $catId;
  122. }
  123. public function setCustomParameters($customParameters)
  124. {
  125. $this->customParameters = $customParameters;
  126. }
  127. public function setGoodsIdList($goodsIdList)
  128. {
  129. $this->goodsIdList = $goodsIdList;
  130. }
  131. public function setIsBrandGoods($isBrandGoods)
  132. {
  133. $this->isBrandGoods = $isBrandGoods;
  134. }
  135. public function setKeyword($keyword)
  136. {
  137. $this->keyword = $keyword;
  138. }
  139. public function setListId($listId)
  140. {
  141. $this->listId = $listId;
  142. }
  143. public function setMerchantType($merchantType)
  144. {
  145. $this->merchantType = $merchantType;
  146. }
  147. public function setMerchantTypeList($merchantTypeList)
  148. {
  149. $this->merchantTypeList = $merchantTypeList;
  150. }
  151. public function setOptId($optId)
  152. {
  153. $this->optId = $optId;
  154. }
  155. public function setPage($page)
  156. {
  157. $this->page = $page;
  158. }
  159. public function setPageSize($pageSize)
  160. {
  161. $this->pageSize = $pageSize;
  162. }
  163. public function setPid($pid)
  164. {
  165. $this->pid = $pid;
  166. }
  167. public function setRangeList($rangeList)
  168. {
  169. $this->rangeList = $rangeList;
  170. }
  171. public function setSortType($sortType)
  172. {
  173. $this->sortType = $sortType;
  174. }
  175. public function setWithCoupon($withCoupon)
  176. {
  177. $this->withCoupon = $withCoupon;
  178. }
  179. public function setBlockCats($blockCats)
  180. {
  181. $this->blockCats = $blockCats;
  182. }
  183. public function setBlockCatPackages($blockCatPackages)
  184. {
  185. $this->blockCatPackages = $blockCatPackages;
  186. }
  187. }
  188. class PddDdkGoodsSearchRequest_RangeListItem extends PopBaseJsonEntity
  189. {
  190. public function __construct()
  191. {
  192. }
  193. /**
  194. * @JsonProperty(Long, "range_from")
  195. */
  196. private $rangeFrom;
  197. /**
  198. * @JsonProperty(Integer, "range_id")
  199. */
  200. private $rangeId;
  201. /**
  202. * @JsonProperty(Long, "range_to")
  203. */
  204. private $rangeTo;
  205. public function setRangeFrom($rangeFrom)
  206. {
  207. $this->rangeFrom = $rangeFrom;
  208. }
  209. public function setRangeId($rangeId)
  210. {
  211. $this->rangeId = $rangeId;
  212. }
  213. public function setRangeTo($rangeTo)
  214. {
  215. $this->rangeTo = $rangeTo;
  216. }
  217. }