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