using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Threading.Tasks;
using XYY.Core.Standard.Mvc;
using XYY.Service.Standard.Finance;

namespace XYY.Api.Finance.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class ExpressageThirdPartyDataController : ApiControllerBase
    {
        private IExpressageThirdPartyDataService _expressageThirdPartyDataService;
        public ExpressageThirdPartyDataController(IExpressageThirdPartyDataService expressageThirdPartyDataService)
        {
            _expressageThirdPartyDataService = expressageThirdPartyDataService;
        }
        [AllowAnonymous]
        public async Task<IActionResult> FedexSurchargesSync()
        {
            Tuple<bool,string> result= await _expressageThirdPartyDataService.FedexSurchargesSync();
            return Ok(result);
        }
        [AllowAnonymous]
        public async Task<IActionResult> DHLSurchargesSync()
        {
            Tuple<bool, string> result = await _expressageThirdPartyDataService.DHLSurchargesSync();
            return Ok(result);
        }
    }
}
