first commit

This commit is contained in:
Zeeshaun
2026-03-11 11:18:25 -05:00
commit f3cb730f3b
472 changed files with 53651 additions and 0 deletions
@@ -0,0 +1,7 @@
namespace CRIF.ACTion.Services.Landmark.DistributionChannel
{
public interface IDistributionChannelLookupService
{
int GetDistributionChannelByZipCode(string zipCode);
}
}
@@ -0,0 +1,23 @@
using CRIF.ACTion.Configuration;
using Landmark.OLA.Models.Loan;
namespace CRIF.ACTion.Services.Landmark.DistributionChannel
{
public class LandmarkDistributionChannelLookupService : IDistributionChannelLookupService
{
private readonly ServicingChannelSettings _settings;
public LandmarkDistributionChannelLookupService(CrifSettings settings)
{
_settings = settings.ServicingChannels;
}
public int GetDistributionChannelByZipCode(string zipCode)
{
var partyId = BranchMapping.BranchCodesByZip.TryGetValue(zipCode, out int foundValue)
? foundValue : _settings.DefaultServicingChannel;
return partyId;
}
}
}
@@ -0,0 +1,38 @@
using CRIF.ACTion.Configuration;
using Landmark.OLA.Models.Loan;
using Landmark.OLA.Models.Loan.Enums;
namespace CRIF.ACTion.Services.Landmark
{
public class ProductIdService
{
private readonly CrifSettings _settings;
public ProductIdService(CrifSettings settings)
{
_settings = settings;
}
public int GetProductId(LoanType loanType)
{
return loanType switch
{
LoanType.CC_CashBack => _settings.ProductIds.CC_CashBack,
LoanType.CC_Rewards => _settings.ProductIds.CC_Rewards,
LoanType.CC_Student => _settings.ProductIds.CC_Student,
LoanType.CC_Secure => _settings.ProductIds.CC_Secure,
LoanType.EQ_HELOC_Flex => _settings.ProductIds.EQ_HELOC_Flex,
LoanType.EQ_Home_Equity_Fixed => _settings.ProductIds.EQ_Home_Equity_Fixed,
LoanType.EQ_Mtg_Refi_Express => _settings.ProductIds.EQ_Mtg_Refi_Express,
LoanType.EQ_Mfg_Home_With_or_Without_Land => _settings.ProductIds.EQ_Mfg_Home_And_Land,
LoanType.V_Vehicle => _settings.ProductIds.V_Vehicle,
LoanType.V_VehiclePreapproval => _settings.ProductIds.V_VehiclePreapproval,
LoanType.M_Boat => _settings.ProductIds.M_Boat,
LoanType.P_Powersport => _settings.ProductIds.P_Powersport,
LoanType.T_TrailerMotorhome => _settings.ProductIds.T_TrailerMotorhome,
LoanType.S_Signature or LoanType.S_Special => _settings.ProductIds.S_Signature,
_ => throw new ArgumentOutOfRangeException(nameof(LoanApplication.LoanType), $"The requested loan type {loanType} is not implemented."),
};
}
}
}
@@ -0,0 +1,9 @@
using Landmark.OLA.Models.Loan.Enums;
namespace CRIF.ACTion.Services.Landmark.SourceChannel
{
public interface ISourceChannelLookupService
{
int GetSourceChannelByLoanType(LoanType loanType);
}
}
@@ -0,0 +1,40 @@
using System.Collections.ObjectModel;
using CRIF.ACTion.Configuration;
using Landmark.OLA.Models.Loan.Enums;
namespace CRIF.ACTion.Services.Landmark.SourceChannel
{
public class LandmarkSourceChannelLookupService : ISourceChannelLookupService
{
private readonly CrifSettings _settings;
private ReadOnlyDictionary<LoanType, int> _loanTypeToSourceChannel;
public LandmarkSourceChannelLookupService(CrifSettings settings)
{
_settings = settings;
ConfigureMapping();
}
private void ConfigureMapping()
{
var mapping = new Dictionary<LoanType, int>
{
{LoanType.CC_CashBack, _settings.SourceChannels.CreditCardSourceChannelId},
{LoanType.CC_Rewards, _settings.SourceChannels.CreditCardSourceChannelId},
{LoanType.CC_Secure, _settings.SourceChannels.CreditCardSourceChannelId},
{LoanType.CC_Student, _settings.SourceChannels.CreditCardSourceChannelId},
};
_loanTypeToSourceChannel = new ReadOnlyDictionary<LoanType, int>(mapping);
}
public int GetSourceChannelByLoanType(LoanType loanType)
{
var channelId = _loanTypeToSourceChannel.TryGetValue(loanType, out int foundValue)
? foundValue : _settings.SourceChannels.DefaultSourceChannelId;
return channelId;
}
}
}