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