private static BankDetailsStatus GetBankDetailsStatus(string vendorId, VendorCase vendorCase) { if (HasVendorId(vendorId)) { return(BankDetailsStatus.Completed); } if (string.IsNullOrWhiteSpace(vendorCase.Status)) { return(BankDetailsStatus.NotSupplied); } if (vendorCase.Status.Equals(LegalEntityVrfCaseStatus.RejectedDataValidation, StringComparison.InvariantCultureIgnoreCase) || vendorCase.Status.Equals(LegalEntityVrfCaseStatus.RejectedVer1, StringComparison.InvariantCultureIgnoreCase) || vendorCase.Status.Equals(LegalEntityVrfCaseStatus.RejectedVerification, StringComparison.InvariantCultureIgnoreCase)) { return(BankDetailsStatus.Rejected); } if (vendorCase.Status.Equals(LegalEntityVrfCaseStatus.Completed, StringComparison.InvariantCultureIgnoreCase)) { return(BankDetailsStatus.Completed); } return(BankDetailsStatus.InProgress); }
private static bool GetBankDetailsRequired(string vrfVendorId, VendorCase vendorCase) { if (HasVendorId(vrfVendorId)) { return(false); } return(string.IsNullOrWhiteSpace(vendorCase.Status) || vendorCase.Status.Equals(LegalEntityVrfCaseStatus.RejectedDataValidation, StringComparison.InvariantCultureIgnoreCase) || vendorCase.Status.Equals(LegalEntityVrfCaseStatus.RejectedVer1, StringComparison.InvariantCultureIgnoreCase) || vendorCase.Status.Equals(LegalEntityVrfCaseStatus.RejectedVerification, StringComparison.InvariantCultureIgnoreCase)); }
public VendorBankStatus(string vendorId, VendorCase vendorCase) { VendorId = vendorId; Status = GetBankDetailsStatus(vendorId, vendorCase); BankDetailsRequired = GetBankDetailsRequired(vendorId, vendorCase); }