public async Task <PurchaseData> Handle(CalculatePurchaseCommand request, CancellationToken cancellationToken) { return(await _purchaseService.CalculatePurchaseInfo(new PurchaseData { GrossAmount = request.GrossAmount, NetAmount = request.NetAmount, VATAmount = request.VATAmount, VATRate = request.VATRate })); }
public async Task <IActionResult> Post([FromBody] PurchaseDataModel purchaseData) { return(Ok(await _purchaseService.CalculatePurchaseInfo(purchaseData))); }