public static Expenses AsFlat(string name, Amount amount) { return(new Expenses(name, amount, false)); }
public static Expenses AsRate(string name, Amount amount) { return(new Expenses(name, amount, true)); }
private Expenses(string name, Amount amount, bool isRate) { this.Name = name; this.Amount = amount; this.IsRate = isRate; }
public Price CalculateFrom(Rate percentage) => new Price(Amount.CalculateFrom(percentage), Currency);
public Price ApplyDiscount(Discount discount) => new Price(Amount.ApplyDiscount(discount), Currency);
public Price ApplyTax(Tax tax) => new Price(Amount.ApplyTax(tax), Currency);