36 lines
915 B
C#
36 lines
915 B
C#
using System;
|
|
using LCU.API.Internal.CoreSoapApiWrapper.CoreSoapUtilities;
|
|
using Serilog;
|
|
using LCU.API.Internal.CoreSoapApiWrapper.DataAccess;
|
|
using LCU.API.Internal.CoreSoapApiWrapper.Models.Responses;
|
|
|
|
namespace LCU.API.Internal.CoreSoapApiWrapper.Services
|
|
{
|
|
public interface ITaxService
|
|
{
|
|
GetTaxIdDataResponse GetTaxIdData(long taxId);
|
|
}
|
|
|
|
public class TaxService : ITaxService
|
|
{
|
|
private readonly ITaxDao _taxDao;
|
|
|
|
public TaxService(ITaxDao taxDao)
|
|
{
|
|
_taxDao = taxDao;
|
|
}
|
|
|
|
public GetTaxIdDataResponse GetTaxIdData(long taxId)
|
|
{
|
|
try
|
|
{
|
|
return _taxDao.GetTaxIdData(taxId);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
Log.Error(ex, $"There was an error while getting TaxIdData for taxId: {taxId}");
|
|
throw;
|
|
}
|
|
}
|
|
}
|
|
} |