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