예제 #1
0
        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);
        }
예제 #2
0
        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));
        }
예제 #3
0
 public VendorBankStatus(string vendorId, VendorCase vendorCase)
 {
     VendorId            = vendorId;
     Status              = GetBankDetailsStatus(vendorId, vendorCase);
     BankDetailsRequired = GetBankDetailsRequired(vendorId, vendorCase);
 }