fromJSON static method
Implementation
static SuspensionReason fromJSON(String data) {
switch (data) {
case "notInsured":
return SuspensionReason.notInsured;
case "noReasonGiven":
return SuspensionReason.noReasonGiven;
case "isHospitalized":
return SuspensionReason.isHospitalized;
case "outsideOfCountry":
return SuspensionReason.outsideOfCountry;
case "changeOfMutuality":
return SuspensionReason.changeOfMutuality;
default:
throw ArgumentError('Invalid SuspensionReason entry value $data');
}
}