transferRecurringStatusFromJson function
TransferRecurringStatus
transferRecurringStatusFromJson(
- Object? transferRecurringStatus, [
- TransferRecurringStatus? defaultValue
Implementation
enums.TransferRecurringStatus transferRecurringStatusFromJson(
Object? transferRecurringStatus, [
enums.TransferRecurringStatus? defaultValue,
]) {
if (transferRecurringStatus is String) {
return enums.$TransferRecurringStatusMap.entries
.firstWhere(
(element) =>
element.value.toLowerCase() ==
transferRecurringStatus.toLowerCase(),
orElse: () => const MapEntry(
enums.TransferRecurringStatus.swaggerGeneratedUnknown, ''))
.key;
}
final parsedResult = defaultValue == null
? null
: enums.$TransferRecurringStatusMap.entries
.firstWhereOrNull((element) => element.value == defaultValue)
?.key;
return parsedResult ??
defaultValue ??
enums.TransferRecurringStatus.swaggerGeneratedUnknown;
}