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 abstract class CardCoupon {
15
16
17
18 @JSONField(name = "base_info")
19 private final CouponBaseInfo couponBaseInfo;
20
21
22
23 @JSONField(name = "advanced_info")
24 private CouponAdvanceInfo couponAdvanceInfo;
25
26
27
28
29
30
31
32 protected CardCoupon(CouponBaseInfo couponBaseInfo) {
33 this.couponBaseInfo = couponBaseInfo;
34 }
35
36 public void cleanCantUpdateField(){
37 this.couponBaseInfo.cleanCantUpdateField();
38 }
39
40
41
42
43
44 public abstract CardType getCardType();
45
46 public CouponBaseInfo getCouponBaseInfo() {
47 return couponBaseInfo;
48 }
49
50 public CouponAdvanceInfo getCouponAdvanceInfo() {
51 return couponAdvanceInfo;
52 }
53
54 public void setCouponAdvanceInfo(CouponAdvanceInfo couponAdvanceInfo) {
55 this.couponAdvanceInfo = couponAdvanceInfo;
56 }
57
58 @Override
59 public String toString() {
60 return "baseInfo=" + couponBaseInfo + ", advanceInfo="
61 + couponAdvanceInfo + ", cardType=" + getCardType();
62 }
63 }