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