PddGoodsSpuGetRequest.php 1.5 KB

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