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