1 package com.foxinmy.weixin4j.model.card;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 public final class CardCoupons {
17 private CardCoupons() {
18 }
19
20
21
22
23
24
25 public static CouponBaseInfo.Builder customBase() {
26 return new CouponBaseInfo.Builder();
27 }
28
29
30
31
32
33
34 public static CouponAdvanceInfo.Builder customAdvance() {
35 return new CouponAdvanceInfo.Builder();
36 }
37
38 public static MemberCard.Builder customMemberCard(){
39 return new MemberCard.Builder();
40 }
41
42
43
44
45
46
47 public static GiftCard.Builder customGiftCard() {
48 return new GiftCard.Builder();
49 }
50
51
52
53
54
55
56 public static PageTheme.Builder customCardPageTheme(){ return new PageTheme.Builder(); }
57
58
59
60
61
62
63 public static GiftCardPage.Builder customCardPage(){ return new GiftCardPage.Builder(); }
64
65
66
67
68
69
70
71
72
73
74
75 public static CardCoupon createCashCoupon(CouponBaseInfo.Builder builder,
76 double reduceCost, double leastCost) {
77 CouponBaseInfo couponBaseInfo = builder.build();
78 CashCoupon coupon = new CashCoupon(couponBaseInfo, reduceCost);
79 coupon.setLeastCost(leastCost);
80 return coupon;
81 }
82
83
84
85
86
87
88
89
90
91 public static CardCoupon createDiscountCoupon(
92 CouponBaseInfo.Builder builder, int discount) {
93 CouponBaseInfo couponBaseInfo = builder.build();
94 DiscountCoupon coupon = new DiscountCoupon(couponBaseInfo, discount);
95 return coupon;
96 }
97
98
99
100
101
102
103
104
105
106 public static CardCoupon createGeneralCoupon(
107 CouponBaseInfo.Builder builder, String explain) {
108 CouponBaseInfo couponBaseInfo = builder.build();
109 GeneralCoupon coupon = new GeneralCoupon(couponBaseInfo, explain);
110 return coupon;
111 }
112
113
114
115
116
117
118
119
120
121 public static CardCoupon createGiftCoupon(CouponBaseInfo.Builder builder,
122 String explain) {
123 CouponBaseInfo couponBaseInfo = builder.build();
124 GiftCoupon coupon = new GiftCoupon(couponBaseInfo, explain);
125 return coupon;
126 }
127
128
129
130
131
132
133
134
135
136 public static CardCoupon createGrouponCoupon(
137 CouponBaseInfo.Builder builder, String explain) {
138 CouponBaseInfo couponBaseInfo = builder.build();
139 GrouponCoupon coupon = new GrouponCoupon(couponBaseInfo, explain);
140 return coupon;
141 }
142
143
144 public static MemberCard createMemberCard(CouponBaseInfo.Builder baseBuilder, MemberCard.Builder memberCardBudiler) {
145 baseBuilder.build();
146 MemberCard memberCard = new MemberCard(baseBuilder.build(), memberCardBudiler);
147 return memberCard;
148 }
149
150
151
152
153
154
155
156
157
158
159 public static VoucherCard createVoucherCard(CouponBaseInfo.Builder baseBuilder, GiftCard.Builder giftCardBuilder){
160 baseBuilder.build();
161 VoucherCard voucherCard = new VoucherCard(baseBuilder.build(), giftCardBuilder);
162 return voucherCard;
163 }
164
165
166
167
168
169
170
171
172 public static GiftCard createGiftCard(CouponBaseInfo.Builder baseBuilder, GiftCard.Builder giftCardBuilder){
173 baseBuilder.build();
174 GiftCard giftCard = new GiftCard(baseBuilder.build(), giftCardBuilder);
175 return giftCard;
176 }
177 }