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