using Business.Resend; using Common; using Common.Model; using JsonRx.AuthFilter; using JsonRx.Helper; using log4net; using System; using System.Web.Http; namespace JsonRx.Api { /// /// Api endpoints for transaction resend module. /// [RoutePrefix("api/v1/resend")] public class ResendController : ApiController { private IResendBusiness _resendBusiness; private static readonly ILog Log = LogManager.GetLogger(typeof(ResendController)); /// /// public ResendController() { } /// /// public ResendController(IResendBusiness resendBusiness) { _resendBusiness = resendBusiness; } /// /// /// [HttpPost] [TokenAuthentication] [Route("list")] public IHttpActionResult GetTransactionResendList(DateFilterParams search) { LogicalThreadContext.Properties[LoggerProperty.PROCESSID] = Guid.NewGuid(); LogicalThreadContext.Properties[LoggerProperty.METHODNAME] = "GetTransactionResendList"; var id = Util.GetCustomerId(Request); JsonRxResponse res = _resendBusiness.GetResendLists(search, id); return Ok(res); } /// /// /// [HttpPost] [TokenAuthentication] [Route("detail")] public IHttpActionResult GetTransactionSummary(DateFilterParams obj) { LogicalThreadContext.Properties[LoggerProperty.PROCESSID] = Guid.NewGuid(); LogicalThreadContext.Properties[LoggerProperty.METHODNAME] = "GetTransactionResendList"; JsonRxResponse res = _resendBusiness.GetTransactionSummary(obj.tranId); return Ok(res); } } }