21 lines
851 B
C#
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);
|
|
}
|