public decimal GetTax() { if (SalesTaxStrategy == null) { return(0m); } return(SalesTaxStrategy.GetTaxFor(this)); }
public decimal GetTax() { return(SalesTaxStrategy?.GetTaxFor(this) ?? throw new Exception($"Invoice cannot be generated. Tax details are not set for tax region {this.ShippingDetails.DestinationCountry}")); }