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