fromString static method
Implementation
static IPaymentStatus fromString(String status) {
switch (status) {
case 'APPROVED':
return IPaymentStatus.approved;
case 'FAIL':
return IPaymentStatus.fail;
case 'PENDING_VERIFICATION':
return IPaymentStatus.pendingVerification;
case 'NONE':
return IPaymentStatus.none;
default:
return IPaymentStatus.none; // Default to a safe value if unknown status
}
}