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