public Contract.Dto.Fee CalculateFee(Contract.Dto.Transaction transactionRecord) { var transaction = _mapper.Map(transactionRecord); var fee = _feeCalculator.CalculateFee(transaction); var totalFee = _feeCalculator.AddExtraFees(fee, _extraFees); return(_mapper.Map(totalFee)); }
public Transaction Map(Contract.Dto.Transaction transaction) { if (transaction == null) { return(null); } return(new Transaction( transaction.MerchantName, transaction.Date, transaction.Amount)); }