first commit
This commit is contained in:
@@ -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."),
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user