PddGoodsCpsUnitChangeRequest.php 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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 PddGoodsCpsUnitChangeRequest extends PopBaseHttpRequest
  6. {
  7. public function __construct()
  8. {
  9. }
  10. /**
  11. * @JsonProperty(Long, "goods_id")
  12. */
  13. private $goodsId;
  14. /**
  15. * @JsonProperty(Long, "rate")
  16. */
  17. private $rate;
  18. /**
  19. * @JsonProperty(Long, "coupon_id")
  20. */
  21. private $couponId;
  22. /**
  23. * @JsonProperty(String, "coupon_start_time")
  24. */
  25. private $couponStartTime;
  26. /**
  27. * @JsonProperty(String, "coupon_end_time")
  28. */
  29. private $couponEndTime;
  30. /**
  31. * @JsonProperty(Long, "discount")
  32. */
  33. private $discount;
  34. /**
  35. * @JsonProperty(Long, "init_quantity")
  36. */
  37. private $initQuantity;
  38. /**
  39. * @JsonProperty(Long, "remain_quantity")
  40. */
  41. private $remainQuantity;
  42. protected function setUserParams(&$params)
  43. {
  44. $this->setUserParam($params, "goods_id", $this->goodsId);
  45. $this->setUserParam($params, "rate", $this->rate);
  46. $this->setUserParam($params, "coupon_id", $this->couponId);
  47. $this->setUserParam($params, "coupon_start_time", $this->couponStartTime);
  48. $this->setUserParam($params, "coupon_end_time", $this->couponEndTime);
  49. $this->setUserParam($params, "discount", $this->discount);
  50. $this->setUserParam($params, "init_quantity", $this->initQuantity);
  51. $this->setUserParam($params, "remain_quantity", $this->remainQuantity);
  52. }
  53. public function getVersion()
  54. {
  55. return "V1";
  56. }
  57. public function getDataType()
  58. {
  59. return "JSON";
  60. }
  61. public function getType()
  62. {
  63. return "pdd.goods.cps.unit.change";
  64. }
  65. public function setGoodsId($goodsId)
  66. {
  67. $this->goodsId = $goodsId;
  68. }
  69. public function setRate($rate)
  70. {
  71. $this->rate = $rate;
  72. }
  73. public function setCouponId($couponId)
  74. {
  75. $this->couponId = $couponId;
  76. }
  77. public function setCouponStartTime($couponStartTime)
  78. {
  79. $this->couponStartTime = $couponStartTime;
  80. }
  81. public function setCouponEndTime($couponEndTime)
  82. {
  83. $this->couponEndTime = $couponEndTime;
  84. }
  85. public function setDiscount($discount)
  86. {
  87. $this->discount = $discount;
  88. }
  89. public function setInitQuantity($initQuantity)
  90. {
  91. $this->initQuantity = $initQuantity;
  92. }
  93. public function setRemainQuantity($remainQuantity)
  94. {
  95. $this->remainQuantity = $remainQuantity;
  96. }
  97. }