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