ex-int-04-shipping-cost/ShippingCosts/Contracts/IShippingCostCalculator.cs
github-classroom[bot] 5db225db88
Initial commit
2025-04-29 15:01:53 +00:00

21 lines
851 B
C#

namespace ShippingCosts.Contracts;
/// <summary>
/// Calculates the shipping cost for a carrier given box dimensions and target country
/// </summary>
public interface IShippingCostCalculator
{
/// <summary>
/// Gets the name of the carrier or the general shipment method
/// </summary>
public string CarrierName { get; }
/// <summary>
/// Calculates the shipping cost for a specific box and target country.
/// Can only calculate shipping costs for countries that are possible to ship to.
/// </summary>
/// <param name="targetCountry">Target country</param>
/// <param name="box">Measurements of the package</param>
/// <returns>The shipping cost if shipment is possible; false otherwise</returns>
public decimal? CalculateShippingCosts(string targetCountry, IMeasuredBox box);
}