* Added VatCodeAssociation
This commit is contained in:
25
FaKrosnoApi/Controllers/VatCodeAssociationController.cs
Normal file
25
FaKrosnoApi/Controllers/VatCodeAssociationController.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using AutoMapper;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using SytelineSaAppEfDataModel.Dtos;
|
||||
using SytelineSaAppEfDataModel.Services;
|
||||
|
||||
namespace FaKrosnoApi.Controllers;
|
||||
|
||||
[ApiController]
|
||||
[Route("api/[controller]")]
|
||||
public class VatCodeAssociationController(IVatCodeAssociationService service, IMapper mapper) : Controller
|
||||
{
|
||||
[HttpGet("by-parameters")]
|
||||
public async Task<ActionResult<VatCodeAssociationDto>> GetVatCodesAssociation(string customerDoInvoice,
|
||||
string endUserType, string productCode)
|
||||
{
|
||||
var result = await service.GetVatCodesAssociation(customerDoInvoice, endUserType, productCode);
|
||||
if (result == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
return Ok(mapper.Map<VatCodeAssociationDto>(result));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user