File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
src/main/java/uk/gov/companieshouse/limitedpartnershipsapi/model Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 11package uk .gov .companieshouse .limitedpartnershipsapi .model ;
22
3- public enum PartnershipNameEnding {
3+ import com . fasterxml . jackson . annotation . JsonCreator ;
44
5+ public enum PartnershipNameEnding {
56 LIMITED_PARTNERSHIP ("Limited Partnership" ),
67 LP ("LP" ),
78 L_DOT_P_DOT ("L.P." ),
@@ -19,12 +20,14 @@ public String getDescription() {
1920 return description ;
2021 }
2122
23+ @ JsonCreator
2224 public static PartnershipNameEnding fromDescription (String description ) {
2325 for (PartnershipNameEnding nameEnding : PartnershipNameEnding .values ()) {
2426 if (nameEnding .getDescription ().equalsIgnoreCase (description )) {
2527 return nameEnding ;
2628 }
2729 }
28- throw new IllegalArgumentException ("No PartnershipNameEnding constant with description " + description );
30+ throw new IllegalArgumentException (
31+ "No PartnershipNameEnding constant with description " + description );
2932 }
3033}
You can’t perform that action at this time.
0 commit comments