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