Skip to content

Commit f82f193

Browse files
committed
add DiscountType
1 parent abc739f commit f82f193

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package com.labs64.netlicensing.domain.vo;
2+
3+
public enum DiscountType {
4+
FIX,
5+
6+
PERCENT;
7+
8+
public static DiscountType parseString(final String discountType) {
9+
if (discountType != null) {
10+
for (final DiscountType type : DiscountType.values()) {
11+
if (discountType.equalsIgnoreCase(type.name())) {
12+
return type;
13+
}
14+
}
15+
}
16+
return null;
17+
}
18+
}

0 commit comments

Comments
 (0)