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