Exemplo n.º 1
0
        double IParcelRules.OverweightChargeRule(ShippingRate shippingRate)
        {
            if (_weight > shippingRate.WeightLimitKg)
            {
                return((_weight - shippingRate.WeightLimitKg) * shippingRate.OverweightChargePerKg);
            }

            return(0);
        }
Exemplo n.º 2
0
        private double CalculateOverweightCharge(ShippingRate shippingRate)
        {
            if (WeightKg > shippingRate.WeightLimitKg)
            {
                return((WeightKg - shippingRate.WeightLimitKg) * shippingRate.OverweightChargePerKg);
            }

            return(0);
        }