PddGoodsQuantityUpdateRequest.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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 PddGoodsQuantityUpdateRequest extends PopBaseHttpRequest
  6. {
  7. public function __construct()
  8. {
  9. }
  10. /**
  11. * @JsonProperty(Long, "goods_id")
  12. */
  13. private $goodsId;
  14. /**
  15. * @JsonProperty(Long, "quantity")
  16. */
  17. private $quantity;
  18. /**
  19. * @JsonProperty(Long, "sku_id")
  20. */
  21. private $skuId;
  22. /**
  23. * @JsonProperty(String, "outer_id")
  24. */
  25. private $outerId;
  26. /**
  27. * @JsonProperty(Integer, "update_type")
  28. */
  29. private $updateType;
  30. protected function setUserParams(&$params)
  31. {
  32. $this->setUserParam($params, "goods_id", $this->goodsId);
  33. $this->setUserParam($params, "quantity", $this->quantity);
  34. $this->setUserParam($params, "sku_id", $this->skuId);
  35. $this->setUserParam($params, "outer_id", $this->outerId);
  36. $this->setUserParam($params, "update_type", $this->updateType);
  37. }
  38. public function getVersion()
  39. {
  40. return "V1";
  41. }
  42. public function getDataType()
  43. {
  44. return "JSON";
  45. }
  46. public function getType()
  47. {
  48. return "pdd.goods.quantity.update";
  49. }
  50. public function setGoodsId($goodsId)
  51. {
  52. $this->goodsId = $goodsId;
  53. }
  54. public function setQuantity($quantity)
  55. {
  56. $this->quantity = $quantity;
  57. }
  58. public function setSkuId($skuId)
  59. {
  60. $this->skuId = $skuId;
  61. }
  62. public function setOuterId($outerId)
  63. {
  64. $this->outerId = $outerId;
  65. }
  66. public function setUpdateType($updateType)
  67. {
  68. $this->updateType = $updateType;
  69. }
  70. }