PddPromotionHomeCouponCreateRequest.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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 PddPromotionHomeCouponCreateRequest extends PopBaseHttpRequest
  6. {
  7. public function __construct()
  8. {
  9. }
  10. /**
  11. * @JsonProperty(String, "batch_desc")
  12. */
  13. private $batchDesc;
  14. /**
  15. * @JsonProperty(Long, "batch_start_time")
  16. */
  17. private $batchStartTime;
  18. /**
  19. * @JsonProperty(Long, "batch_end_time")
  20. */
  21. private $batchEndTime;
  22. /**
  23. * @JsonProperty(Long, "discount")
  24. */
  25. private $discount;
  26. /**
  27. * @JsonProperty(Long, "min_order_amount")
  28. */
  29. private $minOrderAmount;
  30. /**
  31. * @JsonProperty(Long, "init_quantity")
  32. */
  33. private $initQuantity;
  34. /**
  35. * @JsonProperty(Long, "user_limit")
  36. */
  37. private $userLimit;
  38. protected function setUserParams(&$params)
  39. {
  40. $this->setUserParam($params, "batch_desc", $this->batchDesc);
  41. $this->setUserParam($params, "batch_start_time", $this->batchStartTime);
  42. $this->setUserParam($params, "batch_end_time", $this->batchEndTime);
  43. $this->setUserParam($params, "discount", $this->discount);
  44. $this->setUserParam($params, "min_order_amount", $this->minOrderAmount);
  45. $this->setUserParam($params, "init_quantity", $this->initQuantity);
  46. $this->setUserParam($params, "user_limit", $this->userLimit);
  47. }
  48. public function getVersion()
  49. {
  50. return "V1";
  51. }
  52. public function getDataType()
  53. {
  54. return "JSON";
  55. }
  56. public function getType()
  57. {
  58. return "pdd.promotion.home.coupon.create";
  59. }
  60. public function setBatchDesc($batchDesc)
  61. {
  62. $this->batchDesc = $batchDesc;
  63. }
  64. public function setBatchStartTime($batchStartTime)
  65. {
  66. $this->batchStartTime = $batchStartTime;
  67. }
  68. public function setBatchEndTime($batchEndTime)
  69. {
  70. $this->batchEndTime = $batchEndTime;
  71. }
  72. public function setDiscount($discount)
  73. {
  74. $this->discount = $discount;
  75. }
  76. public function setMinOrderAmount($minOrderAmount)
  77. {
  78. $this->minOrderAmount = $minOrderAmount;
  79. }
  80. public function setInitQuantity($initQuantity)
  81. {
  82. $this->initQuantity = $initQuantity;
  83. }
  84. public function setUserLimit($userLimit)
  85. {
  86. $this->userLimit = $userLimit;
  87. }
  88. }