Exemplo n.º 1
0
        public decimal Calculate(FreightData freightData)
        {
            if (freightData.IsInternationalFreight())
            {
                throw new InvalidOperationException("International shipment. See other options more suitable to your business");
            }

            return(freightData.MaximumPayload * 0.03M);
        }
Exemplo n.º 2
0
 public decimal GetEstimatedQuotes(FreightData freightData)
 {
     return(_freightCalculatorStrategy.Calculate(freightData));
 }
Exemplo n.º 3
0
 public decimal Calculate(FreightData freightData)
 {
     return(freightData.MaximumPayload * 0.07M);
 }