This commit is contained in:
Zeeshaun
2026-03-17 09:53:09 -05:00
parent cdcba54aa4
commit 1a0702a79a
590 changed files with 62058 additions and 0 deletions
@@ -0,0 +1,10 @@
using System.Threading.Tasks;
using LCU.Library.Internal.IncentiveApiModels.Requests;
namespace LCU.API.Internal.Operations.IncentiveApi.Services.QueueServices
{
public interface IQueueActionCreditCardService
{
Task QueueActionCreditCardProcess(ActionCreditCardRequest request);
}
}
@@ -0,0 +1,10 @@
using System.Threading.Tasks;
using LCU.Library.Internal.IncentiveApiModels.Requests;
namespace LCU.API.Internal.Operations.IncentiveApi.Services.QueueServices
{
public interface IQueueActionVehicleService
{
Task QueueActionVehicleProcess(ActionVehicleRequest request);
}
}
@@ -0,0 +1,10 @@
using System.Threading.Tasks;
using LCU.Library.Internal.IncentiveApiModels.Requests;
namespace LCU.API.Internal.Operations.IncentiveApi.Services.QueueServices
{
public interface IQueueAlliedGapMbpService
{
Task QueueGapMbpProcess(AlliedGapMbpRequest request);
}
}
@@ -0,0 +1,10 @@
using System.Threading.Tasks;
using LCU.Library.Internal.IncentiveApiModels.Requests;
namespace LCU.API.Internal.Operations.IncentiveApi.Services.QueueServices
{
public interface IQueueCreditCardImportService
{
Task QueueCreditCardSalesImport(ImportCreditCardSalesRequest request);
}
}
@@ -0,0 +1,10 @@
using System.Threading.Tasks;
using LCU.Library.Internal.IncentiveApiModels.Requests;
namespace LCU.API.Internal.Operations.IncentiveApi.Services.QueueServices
{
public interface IQueueDayforceSyncService
{
Task QueueDayforceSyncProcess(DayforceProcessRequest request);
}
}
@@ -0,0 +1,10 @@
using System.Threading.Tasks;
using LCU.Library.Internal.IncentiveApiModels.Requests;
namespace LCU.API.Internal.Operations.IncentiveApi.Services.QueueServices
{
public interface IQueueGoalDispersalService
{
Task QueueGoalDispersalProcess(GoalDispersalRequest request);
}
}
@@ -0,0 +1,10 @@
using System.Threading.Tasks;
using LCU.Library.Internal.IncentiveApiModels.Requests;
namespace LCU.API.Internal.Operations.IncentiveApi.Services.QueueServices
{
public interface IQueueIncentiveProcessesService
{
Task QueueIncentiveProcess(IncentiveProcessRequest request);
}
}
@@ -0,0 +1,10 @@
using System.Threading.Tasks;
using LCU.Library.Internal.IncentiveApiModels.Requests;
namespace LCU.API.Internal.Operations.IncentiveApi.Services.QueueServices
{
public interface IQueueIndirectVehicleImportService
{
Task QueueIndirectVehicleSalesImport(ImportIndirectVehicleSalesRequest request);
}
}
@@ -0,0 +1,10 @@
using System.Threading.Tasks;
using LCU.Library.Internal.IncentiveApiModels.Requests;
namespace LCU.API.Internal.Operations.IncentiveApi.Services.QueueServices
{
public interface IQueueNightlyIncentiveProcessesService
{
Task QueueNightlyIncentiveProcess(NightlyIncentiveProcessRequest request);
}
}
@@ -0,0 +1,10 @@
using System.Threading.Tasks;
using LCU.Library.Internal.IncentiveApiModels.Requests;
namespace LCU.API.Internal.Operations.IncentiveApi.Services.QueueServices
{
public interface IQueuePayoutIncentiveService
{
Task QueuePayoutIncentiveProcess(PayoutIncentiveRequest request);
}
}
@@ -0,0 +1,10 @@
using System.Threading.Tasks;
using LCU.Library.Internal.IncentiveApiModels.Requests;
namespace LCU.API.Internal.Operations.IncentiveApi.Services.QueueServices
{
public interface IQueueReportingService
{
Task QueueReportingProcess(ReportingRequest request);
}
}
@@ -0,0 +1,36 @@
using System.Threading;
using LCU.API.Internal.Operations.IncentiveApi.Configuration;
using LCU.Api.Internal.MaidBotLib.Models;
using LCU.Library.Internal.Exceptions;
using LCU.Library.Internal.IncentiveApiModels.Requests;
using MassTransit;
namespace LCU.API.Internal.Operations.IncentiveApi.Services.QueueServices
{
public class QueueActionCreditCardService : IQueueActionCreditCardService
{
private readonly ISendEndpoint _sendEndpoint;
public QueueActionCreditCardService(IBusControl busControl, ReceiveEndpointConfigurations receiveEndpointConfigurations)
{
_sendEndpoint = busControl.GetSendEndpoint(receiveEndpointConfigurations.ActionCreditCardProcessEndpoint.ReceiveEndpointUri).Result;
}
public async Task QueueActionCreditCardProcess(ActionCreditCardRequest request)
{
try
{
var cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(30));
await _sendEndpoint.Send(request, cancellationTokenSource.Token);
}
catch (Exception exception)
{
var message = "Failed to Queue Action Credit Card Process.";
Log.ForContext(Enum.GetName(typeof(PropertyEnum), PropertyEnum.Group),
Enum.GetName(typeof(GroupEnum), GroupEnum.ITDevelopment))
.Fatal(exception, message);
throw new ServiceException(message);
}
}
}
}
@@ -0,0 +1,36 @@
using System.Threading;
using LCU.API.Internal.Operations.IncentiveApi.Configuration;
using LCU.Api.Internal.MaidBotLib.Models;
using LCU.Library.Internal.Exceptions;
using LCU.Library.Internal.IncentiveApiModels.Requests;
using MassTransit;
namespace LCU.API.Internal.Operations.IncentiveApi.Services.QueueServices
{
public class QueueActionVehicleService : IQueueActionVehicleService
{
private readonly ISendEndpoint _sendEndpoint;
public QueueActionVehicleService(IBusControl busControl, ReceiveEndpointConfigurations receiveEndpointConfigurations)
{
_sendEndpoint = busControl.GetSendEndpoint(receiveEndpointConfigurations.ActionVehicleProcessEndpoint.ReceiveEndpointUri).Result;
}
public async Task QueueActionVehicleProcess(ActionVehicleRequest request)
{
try
{
var cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(30));
await _sendEndpoint.Send(request, cancellationTokenSource.Token);
}
catch (Exception exception)
{
var message = "Failed to Queue Action Vehicle Process.";
Log.ForContext(Enum.GetName(typeof(PropertyEnum), PropertyEnum.Group),
Enum.GetName(typeof(GroupEnum), GroupEnum.ITDevelopment))
.Fatal(exception, message);
throw new ServiceException(message);
}
}
}
}
@@ -0,0 +1,36 @@
using System.Threading;
using LCU.API.Internal.Operations.IncentiveApi.Configuration;
using LCU.Api.Internal.MaidBotLib.Models;
using LCU.Library.Internal.Exceptions;
using LCU.Library.Internal.IncentiveApiModels.Requests;
using MassTransit;
namespace LCU.API.Internal.Operations.IncentiveApi.Services.QueueServices
{
public class QueueAlliedGapMbpService : IQueueAlliedGapMbpService
{
private readonly ISendEndpoint _sendEndpoint;
public QueueAlliedGapMbpService(IBusControl busControl, ReceiveEndpointConfigurations receiveEndpointConfigurations)
{
_sendEndpoint = busControl.GetSendEndpoint(receiveEndpointConfigurations.GapMbpProcessEndpoint.ReceiveEndpointUri).Result;
}
public async Task QueueGapMbpProcess(AlliedGapMbpRequest request)
{
try
{
var cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(30));
await _sendEndpoint.Send(request, cancellationTokenSource.Token);
}
catch (Exception exception)
{
var message = "Failed to Queue Gap Mbp Process.";
Log.ForContext(Enum.GetName(typeof(PropertyEnum), PropertyEnum.Group),
Enum.GetName(typeof(GroupEnum), GroupEnum.ITDevelopment))
.Fatal(exception, message);
throw new ServiceException(message);
}
}
}
}
@@ -0,0 +1,37 @@
using System.Threading;
using LCU.API.Internal.Operations.IncentiveApi.Configuration;
using LCU.Api.Internal.MaidBotLib.Models;
using LCU.Library.Internal.Exceptions;
using LCU.Library.Internal.IncentiveApiModels.Requests;
using MassTransit;
namespace LCU.API.Internal.Operations.IncentiveApi.Services.QueueServices
{
public class QueueCreditCardImportService : IQueueCreditCardImportService
{
private readonly ISendEndpoint _sendEndpoint;
public QueueCreditCardImportService(IBusControl busControl, ReceiveEndpointConfigurations receiveEndpointConfigurations)
{
_sendEndpoint = busControl.GetSendEndpoint(receiveEndpointConfigurations.ImportCreditCardSalesEndpoint.ReceiveEndpointUri).Result;
}
public async Task QueueCreditCardSalesImport(ImportCreditCardSalesRequest request)
{
try
{
var cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(30));
await _sendEndpoint.Send(request, cancellationTokenSource.Token);
}
catch (Exception exception)
{
var message = "Failed to Queue Credit Card Sales Import.";
Log.ForContext(Enum.GetName(typeof(PropertyEnum), PropertyEnum.Group),
Enum.GetName(typeof(GroupEnum), GroupEnum.ITDevelopment))
.Fatal(exception, message);
throw new ServiceException(message);
}
}
}
}
@@ -0,0 +1,36 @@
using System.Threading;
using LCU.API.Internal.Operations.IncentiveApi.Configuration;
using LCU.Api.Internal.MaidBotLib.Models;
using LCU.Library.Internal.Exceptions;
using LCU.Library.Internal.IncentiveApiModels.Requests;
using MassTransit;
namespace LCU.API.Internal.Operations.IncentiveApi.Services.QueueServices
{
public class QueueDayforceSyncService : IQueueDayforceSyncService
{
private readonly ISendEndpoint _sendEndpoint;
public QueueDayforceSyncService(IBusControl busControl, ReceiveEndpointConfigurations receiveEndpointConfigurations)
{
_sendEndpoint = busControl.GetSendEndpoint(receiveEndpointConfigurations.DayforceSyncProcessEndpoint.ReceiveEndpointUri).Result;
}
public async Task QueueDayforceSyncProcess(DayforceProcessRequest request)
{
try
{
var cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(30));
await _sendEndpoint.Send(request, cancellationTokenSource.Token);
}
catch (Exception exception)
{
var message = "Failed to Queue Dayforce Sync Process.";
Log.ForContext(Enum.GetName(typeof(PropertyEnum), PropertyEnum.Group),
Enum.GetName(typeof(GroupEnum), GroupEnum.ITDevelopment))
.Fatal(exception, message);
throw new ServiceException(message);
}
}
}
}
@@ -0,0 +1,36 @@
using System.Threading;
using LCU.API.Internal.Operations.IncentiveApi.Configuration;
using LCU.Api.Internal.MaidBotLib.Models;
using LCU.Library.Internal.Exceptions;
using LCU.Library.Internal.IncentiveApiModels.Requests;
using MassTransit;
namespace LCU.API.Internal.Operations.IncentiveApi.Services.QueueServices
{
public class QueueGoalDispersalService : IQueueGoalDispersalService
{
private readonly ISendEndpoint _sendEndpoint;
public QueueGoalDispersalService(IBusControl busControl, ReceiveEndpointConfigurations receiveEndpointConfigurations)
{
_sendEndpoint = busControl.GetSendEndpoint(receiveEndpointConfigurations.GoalDispersalProcessEndpoint.ReceiveEndpointUri).Result;
}
public async Task QueueGoalDispersalProcess(GoalDispersalRequest request)
{
try
{
var cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(30));
await _sendEndpoint.Send(request, cancellationTokenSource.Token);
}
catch (Exception exception)
{
var message = "Failed to Queue Goal Dispersal Process.";
Log.ForContext(Enum.GetName(typeof(PropertyEnum), PropertyEnum.Group),
Enum.GetName(typeof(GroupEnum), GroupEnum.ITDevelopment))
.Fatal(exception, message);
throw new ServiceException(message);
}
}
}
}
@@ -0,0 +1,35 @@
using System.Threading;
using LCU.API.Internal.Operations.IncentiveApi.Configuration;
using LCU.Api.Internal.MaidBotLib.Models;
using LCU.Library.Internal.Exceptions;
using LCU.Library.Internal.IncentiveApiModels.Requests;
using MassTransit;
namespace LCU.API.Internal.Operations.IncentiveApi.Services.QueueServices
{
public class QueueIncentiveProcessesService : IQueueIncentiveProcessesService
{
private readonly ISendEndpoint _sendEndpoint;
public QueueIncentiveProcessesService(IBusControl busControl, ReceiveEndpointConfigurations receiveEndpointConfigurations)
{
_sendEndpoint = busControl.GetSendEndpoint(receiveEndpointConfigurations.IncentiveProcessesEndpoint.ReceiveEndpointUri).Result;
}
public async Task QueueIncentiveProcess(IncentiveProcessRequest request)
{
try
{
var cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(30));
await _sendEndpoint.Send(request, cancellationTokenSource.Token);
}
catch (Exception exception)
{
var message = "Failed to Queue Incentive Process.";
Log.ForContext(Enum.GetName(typeof(PropertyEnum), PropertyEnum.Group), Enum.GetName(typeof(GroupEnum), GroupEnum.ITDevelopment))
.Fatal(exception, message);
throw new ServiceException(message);
}
}
}
}
@@ -0,0 +1,37 @@
using System.Threading;
using LCU.API.Internal.Operations.IncentiveApi.Configuration;
using LCU.Api.Internal.MaidBotLib.Models;
using LCU.Library.Internal.Exceptions;
using LCU.Library.Internal.IncentiveApiModels.Requests;
using MassTransit;
namespace LCU.API.Internal.Operations.IncentiveApi.Services.QueueServices
{
public class QueueIndirectVehicleImportService : IQueueIndirectVehicleImportService
{
private readonly ISendEndpoint _sendEndpoint;
public QueueIndirectVehicleImportService(IBusControl busControl, ReceiveEndpointConfigurations receiveEndpointConfigurations)
{
_sendEndpoint = busControl.GetSendEndpoint(receiveEndpointConfigurations.ImportIndirectVehicleSalesEndpoint.ReceiveEndpointUri).Result;
}
public async Task QueueIndirectVehicleSalesImport(ImportIndirectVehicleSalesRequest request)
{
try
{
var cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(30));
await _sendEndpoint.Send(request, cancellationTokenSource.Token);
}
catch (Exception exception)
{
var message = "Failed to Queue Indirect Vehicle Sales Import.";
Log.ForContext(Enum.GetName(typeof(PropertyEnum), PropertyEnum.Group),
Enum.GetName(typeof(GroupEnum), GroupEnum.ITDevelopment))
.Fatal(exception, message);
throw new ServiceException(message);
}
}
}
}
@@ -0,0 +1,35 @@
using System.Threading;
using LCU.API.Internal.Operations.IncentiveApi.Configuration;
using LCU.Api.Internal.MaidBotLib.Models;
using LCU.Library.Internal.Exceptions;
using LCU.Library.Internal.IncentiveApiModels.Requests;
using MassTransit;
namespace LCU.API.Internal.Operations.IncentiveApi.Services.QueueServices
{
public class QueueNightlyIncentiveProcessesService : IQueueNightlyIncentiveProcessesService
{
private readonly ISendEndpoint _sendEndpoint;
public QueueNightlyIncentiveProcessesService(IBusControl busControl, ReceiveEndpointConfigurations receiveEndpointConfigurations)
{
_sendEndpoint = busControl.GetSendEndpoint(receiveEndpointConfigurations.NightlyIncentiveProcessesEndpoint.ReceiveEndpointUri).Result;
}
public async Task QueueNightlyIncentiveProcess(NightlyIncentiveProcessRequest request)
{
try
{
var cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(30));
await _sendEndpoint.Send(request, cancellationTokenSource.Token);
}
catch (Exception exception)
{
var message = "Failed to Queue Nightly Incentive Process.";
Log.ForContext(Enum.GetName(typeof(PropertyEnum), PropertyEnum.Group), Enum.GetName(typeof(GroupEnum), GroupEnum.ITDevelopment))
.Fatal(exception, message);
throw new ServiceException(message);
}
}
}
}
@@ -0,0 +1,36 @@
using System.Threading;
using LCU.API.Internal.Operations.IncentiveApi.Configuration;
using LCU.Api.Internal.MaidBotLib.Models;
using LCU.Library.Internal.Exceptions;
using LCU.Library.Internal.IncentiveApiModels.Requests;
using MassTransit;
namespace LCU.API.Internal.Operations.IncentiveApi.Services.QueueServices
{
public class QueuePayoutIncentiveService : IQueuePayoutIncentiveService
{
private readonly ISendEndpoint _sendEndpoint;
public QueuePayoutIncentiveService(IBusControl busControl, ReceiveEndpointConfigurations receiveEndpointConfigurations)
{
_sendEndpoint = busControl.GetSendEndpoint(receiveEndpointConfigurations.PayoutIncentiveProcessEndpoint.ReceiveEndpointUri).Result;
}
public async Task QueuePayoutIncentiveProcess(PayoutIncentiveRequest request)
{
try
{
var cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(30));
await _sendEndpoint.Send(request, cancellationTokenSource.Token);
}
catch (Exception exception)
{
var message = "Failed to Queue Payout Incentive Process.";
Log.ForContext(Enum.GetName(typeof(PropertyEnum), PropertyEnum.Group),
Enum.GetName(typeof(GroupEnum), GroupEnum.ITDevelopment))
.Fatal(exception, message);
throw new ServiceException(message);
}
}
}
}
@@ -0,0 +1,37 @@
using System.Threading;
using LCU.API.Internal.Operations.IncentiveApi.Configuration;
using LCU.Api.Internal.MaidBotLib.Models;
using LCU.Library.Internal.Exceptions;
using LCU.Library.Internal.IncentiveApiModels.Requests;
using MassTransit;
namespace LCU.API.Internal.Operations.IncentiveApi.Services.QueueServices
{
public class QueueReportingService : IQueueReportingService
{
private readonly ISendEndpoint _sendEndpoint;
public QueueReportingService(IBusControl busControl, ReceiveEndpointConfigurations receiveEndpointConfigurations)
{
_sendEndpoint = busControl.GetSendEndpoint(receiveEndpointConfigurations.ReportingProcessEndpoint.ReceiveEndpointUri).Result;
}
public async Task QueueReportingProcess(ReportingRequest request)
{
try
{
var cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(30));
await _sendEndpoint.Send(request, cancellationTokenSource.Token);
}
catch (Exception exception)
{
var message = "Failed to Queue Reporting Process.";
Log.ForContext(Enum.GetName(typeof(PropertyEnum), PropertyEnum.Group),
Enum.GetName(typeof(GroupEnum), GroupEnum.ITDevelopment))
.Fatal(exception, message);
throw new ServiceException(message);
}
}
}
}