1 package com.foxinmy.weixin4j.model.card;
2
3 import com.alibaba.fastjson.annotation.JSONField;
4 import com.foxinmy.weixin4j.type.card.CardType;
5
6
7
8
9
10
11
12
13
14 public class DiscountCoupon extends CardCoupon {
15
16
17
18 private final int discount;
19
20
21
22
23
24
25
26
27
28 public DiscountCoupon(CouponBaseInfo couponBaseInfo, int discount) {
29 super(couponBaseInfo);
30 this.discount = discount;
31 }
32
33 public int getDiscount() {
34 return discount;
35 }
36
37 @JSONField(serialize = false)
38 @Override
39 public CardType getCardType() {
40 return CardType.DISCOUNT;
41 }
42
43 @Override
44 public String toString() {
45 return "DiscountCoupon [discount=" + discount + ", " + super.toString()
46 + "]";
47 }
48 }