Adding
This commit is contained in:
+86
@@ -0,0 +1,86 @@
|
||||
using LCU.Library.Internal.IncentiveApiModels.Entities;
|
||||
using LCU.Library.Internal.IncentiveApiModels.Enums;
|
||||
|
||||
namespace LCU.API.Internal.Operations.IncentiveApi.Models.Action;
|
||||
|
||||
public class ActionCreditCardBusinessRow : IActionFileObject
|
||||
{
|
||||
public string BookedDate { get; set; }
|
||||
public string BusinessTradeName { get; set; }
|
||||
public string BusinessLegalName { get; set; }
|
||||
public string AppID { get; set; }
|
||||
public string Principal { get; set; }
|
||||
public string ProdDetailFirstName { get; set; }
|
||||
public string ProdDetailLastName { get; set; }
|
||||
public string ProdDetailEmail { get; set; }
|
||||
public string ProdDetailEmployeeNum { get; set; }
|
||||
public string IncentiveEarnedEmail { get; set; }
|
||||
public string ProductShortName { get; set; }
|
||||
|
||||
public Activity CreateActivity(AppUser appUser)
|
||||
{
|
||||
var homeDept = appUser.FindHomeDepartment();
|
||||
return new Activity()
|
||||
{
|
||||
Product = Product.CreditCard,
|
||||
Type = ActivityType.Sale,
|
||||
State = ActivityState.Accepted,
|
||||
SourceSystem = SystemType.Action,
|
||||
SourceCreated = DateTime.Parse(BookedDate),
|
||||
Accepted = DateTime.Parse(BookedDate).Date.AddHours(12),
|
||||
SourceId = AppID,
|
||||
Detail = new ActivityDetail()
|
||||
{
|
||||
MemberName = BusinessLegalName,
|
||||
AccountBalance = IActionFileObject.ParseMoneyDouble(Principal),
|
||||
AccountStatus = ProductShortName
|
||||
},
|
||||
AppUserId = appUser.Id,
|
||||
EmployeeEmail = appUser.AdEmail,
|
||||
EmployeeId = appUser.EmployeeId,
|
||||
DepartmentId = homeDept.DepartmentId
|
||||
};
|
||||
}
|
||||
|
||||
public DeadActivity CreateDeadActivity(DeadActivityReason reasonCode, string note, string employeeEmail = null, string employeeId = null)
|
||||
{
|
||||
return new DeadActivity(AppID, SystemType.Action, reasonCode, note)
|
||||
{
|
||||
Product = Product.CreditCard,
|
||||
Type = ActivityType.Sale,
|
||||
State = ActivityState.Accepted,
|
||||
SourceSystem = SystemType.Action,
|
||||
SourceCreated = DateTime.Parse(BookedDate),
|
||||
Accepted = DateTime.Parse(BookedDate).Date.AddHours(12),
|
||||
SourceId = AppID,
|
||||
DeadDetail = new DeadActivityDetail()
|
||||
{
|
||||
MemberName = BusinessLegalName,
|
||||
AccountBalance = IActionFileObject.ParseMoneyDouble(Principal),
|
||||
AccountStatus = ProductShortName
|
||||
},
|
||||
EmployeeEmail = employeeEmail,
|
||||
EmployeeId = employeeId,
|
||||
};
|
||||
}
|
||||
|
||||
public string GetEmployeeEmail()
|
||||
{
|
||||
return string.IsNullOrWhiteSpace(IncentiveEarnedEmail) ? null : IncentiveEarnedEmail.Trim();
|
||||
}
|
||||
|
||||
public string GetLoanOfficerEmail()
|
||||
{
|
||||
return string.IsNullOrWhiteSpace(ProdDetailEmail) ? null : ProdDetailEmail.Trim();
|
||||
}
|
||||
|
||||
public string GetLoanOfficerEmailByName()
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(ProdDetailFirstName) || string.IsNullOrWhiteSpace(ProdDetailLastName))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return $"{ProdDetailFirstName.Trim()}{ProdDetailLastName.Trim()}@landmarkcu.com";
|
||||
}
|
||||
}
|
||||
+86
@@ -0,0 +1,86 @@
|
||||
using LCU.Library.Internal.IncentiveApiModels.Entities;
|
||||
using LCU.Library.Internal.IncentiveApiModels.Enums;
|
||||
|
||||
namespace LCU.API.Internal.Operations.IncentiveApi.Models.Action;
|
||||
|
||||
public class ActionCreditCardPersonalRow : IActionFileObject
|
||||
{
|
||||
public string BookedDate { get; set; }
|
||||
public string MemberFirstName { get; set; }
|
||||
public string MemberLastName { get; set; }
|
||||
public string AppID { get; set; }
|
||||
public string Principal { get; set; }
|
||||
public string ProdDetailFirstName { get; set; }
|
||||
public string ProdDetailLastName { get; set; }
|
||||
public string ProdDetailEmail { get; set; }
|
||||
public string ProdDetailEmployeeNum { get; set; }
|
||||
public string IncentiveEarnedEmail { get; set; }
|
||||
public string ProductShortName { get; set; }
|
||||
|
||||
public Activity CreateActivity(AppUser appUser)
|
||||
{
|
||||
var homeDept = appUser.FindHomeDepartment();
|
||||
return new Activity()
|
||||
{
|
||||
Product = Product.CreditCard,
|
||||
Type = ActivityType.Sale,
|
||||
State = ActivityState.Accepted,
|
||||
SourceSystem = SystemType.Action,
|
||||
SourceCreated = DateTime.Parse(BookedDate),
|
||||
Accepted = DateTime.Parse(BookedDate).Date.AddHours(12),
|
||||
SourceId = AppID,
|
||||
Detail = new ActivityDetail()
|
||||
{
|
||||
MemberName = MemberFirstName + " " + MemberLastName,
|
||||
AccountBalance = IActionFileObject.ParseMoneyDouble(Principal),
|
||||
AccountStatus = ProductShortName
|
||||
},
|
||||
AppUserId = appUser.Id,
|
||||
EmployeeEmail = appUser.AdEmail,
|
||||
EmployeeId = appUser.EmployeeId,
|
||||
DepartmentId = homeDept.DepartmentId
|
||||
};
|
||||
}
|
||||
|
||||
public DeadActivity CreateDeadActivity(DeadActivityReason reasonCode, string note, string employeeEmail = null, string employeeId = null)
|
||||
{
|
||||
return new DeadActivity(AppID, SystemType.Action, reasonCode, note)
|
||||
{
|
||||
Product = Product.CreditCard,
|
||||
Type = ActivityType.Sale,
|
||||
State = ActivityState.Accepted,
|
||||
SourceSystem = SystemType.Action,
|
||||
SourceCreated = DateTime.Parse(BookedDate),
|
||||
Accepted = DateTime.Parse(BookedDate).Date.AddHours(12),
|
||||
SourceId = AppID,
|
||||
DeadDetail = new DeadActivityDetail()
|
||||
{
|
||||
MemberName = MemberFirstName + " " + MemberLastName,
|
||||
AccountBalance = IActionFileObject.ParseMoneyDouble(Principal),
|
||||
AccountStatus = ProductShortName
|
||||
},
|
||||
EmployeeEmail = employeeEmail,
|
||||
EmployeeId = employeeId,
|
||||
};
|
||||
}
|
||||
|
||||
public string GetEmployeeEmail()
|
||||
{
|
||||
return string.IsNullOrWhiteSpace(IncentiveEarnedEmail) ? null : IncentiveEarnedEmail.Trim();
|
||||
}
|
||||
|
||||
public string GetLoanOfficerEmail()
|
||||
{
|
||||
return string.IsNullOrWhiteSpace(ProdDetailEmail) ? null : ProdDetailEmail.Trim();
|
||||
}
|
||||
|
||||
public string GetLoanOfficerEmailByName()
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(ProdDetailFirstName) || string.IsNullOrWhiteSpace(ProdDetailLastName))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return $"{ProdDetailFirstName.Trim()}{ProdDetailLastName.Trim()}@landmarkcu.com";
|
||||
}
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
namespace LCU.API.Internal.Operations.IncentiveApi.Models.Action;
|
||||
|
||||
public class ActionSaleRow
|
||||
{
|
||||
public string EmailAddress { get; set; }
|
||||
public string Member_Number { get; set; }
|
||||
public string Account_Number { get; set; }
|
||||
public string Borrower_Name { get; set; }
|
||||
public string APP_START_DATE { get; set; }
|
||||
public string OPEN_DATE { get; set; }
|
||||
public string PBorrowerSSN_Ind { get; set; }
|
||||
public string CBorrowerName_Ind { get; set; }
|
||||
public string CBorrowerSSN_Ind { get; set; }
|
||||
public string SBorrowerName_Ind { get; set; }
|
||||
public string SBorrowerSSN_Ind { get; set; }
|
||||
public string IndAppID { get; set; }
|
||||
public string IndProduct { get; set; }
|
||||
public string IndAmtFinanced { get; set; }
|
||||
public string IndCreationDate { get; set; }
|
||||
public string IndAccountNumber { get; set; }
|
||||
public string PBorrowerName_Veh { get; set; }
|
||||
public string PBorrowerSSN_Veh { get; set; }
|
||||
public string CBorrowerName_Veh { get; set; }
|
||||
public string CBorrowerSSN_Veh { get; set; }
|
||||
public string SBorrowerName_Veh { get; set; }
|
||||
public string SBorrowerSSN_Veh { get; set; }
|
||||
public string VehAppID { get; set; }
|
||||
public string VehProduct { get; set; }
|
||||
public string VehAmtFinanced { get; set; }
|
||||
public string DistributionChannel { get; set; }
|
||||
public string DistributionChannelCode { get; set; }
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
using System.Globalization;
|
||||
using LCU.Library.Internal.IncentiveApiModels.Entities;
|
||||
using LCU.Library.Internal.IncentiveApiModels.Enums;
|
||||
|
||||
namespace LCU.API.Internal.Operations.IncentiveApi.Models.Action;
|
||||
|
||||
public interface IActionFileObject
|
||||
{
|
||||
static readonly CultureInfo USEnglish = new CultureInfo("en-US");
|
||||
public Activity CreateActivity(AppUser appUser);
|
||||
public string GetEmployeeEmail();
|
||||
public string GetLoanOfficerEmail();
|
||||
public string GetLoanOfficerEmailByName();
|
||||
public DeadActivity CreateDeadActivity(DeadActivityReason reasonCode, string note, string employeeEmail = null, string employeeId = null);
|
||||
public static double? ParseMoneyDouble(string indAmtFinanced)
|
||||
{
|
||||
var parsed = decimal.Parse(indAmtFinanced, NumberStyles.Currency, USEnglish);
|
||||
return (double)parsed;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user