PddGoodsSpuSearchRequest.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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 PddGoodsSpuSearchRequest extends PopBaseHttpRequest
  6. {
  7. public function __construct()
  8. {
  9. }
  10. /**
  11. * @JsonProperty(Long, "cat_id")
  12. */
  13. private $catId;
  14. /**
  15. * @JsonProperty(List<\Com\Pdd\Pop\Sdk\Api\Request\PddGoodsSpuSearchRequest_KeyPropItem>, "key_prop")
  16. */
  17. private $keyProp;
  18. /**
  19. * @JsonProperty(String, "spu_name")
  20. */
  21. private $spuName;
  22. protected function setUserParams(&$params)
  23. {
  24. $this->setUserParam($params, "cat_id", $this->catId);
  25. $this->setUserParam($params, "key_prop", $this->keyProp);
  26. $this->setUserParam($params, "spu_name", $this->spuName);
  27. }
  28. public function getVersion()
  29. {
  30. return "V1";
  31. }
  32. public function getDataType()
  33. {
  34. return "JSON";
  35. }
  36. public function getType()
  37. {
  38. return "pdd.goods.spu.search";
  39. }
  40. public function setCatId($catId)
  41. {
  42. $this->catId = $catId;
  43. }
  44. public function setKeyProp($keyProp)
  45. {
  46. $this->keyProp = $keyProp;
  47. }
  48. public function setSpuName($spuName)
  49. {
  50. $this->spuName = $spuName;
  51. }
  52. }
  53. class PddGoodsSpuSearchRequest_KeyPropItem extends PopBaseJsonEntity
  54. {
  55. public function __construct()
  56. {
  57. }
  58. /**
  59. * @JsonProperty(Long, "ref_pid")
  60. */
  61. private $refPid;
  62. /**
  63. * @JsonProperty(String, "value_unit")
  64. */
  65. private $valueUnit;
  66. /**
  67. * @JsonProperty(String, "value")
  68. */
  69. private $value;
  70. /**
  71. * @JsonProperty(Long, "vid")
  72. */
  73. private $vid;
  74. public function setRefPid($refPid)
  75. {
  76. $this->refPid = $refPid;
  77. }
  78. public function setValueUnit($valueUnit)
  79. {
  80. $this->valueUnit = $valueUnit;
  81. }
  82. public function setValue($value)
  83. {
  84. $this->value = $value;
  85. }
  86. public function setVid($vid)
  87. {
  88. $this->vid = $vid;
  89. }
  90. }