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;
 }
Exemple #4
0
 public Price CalculateFrom(Rate percentage)
 => new Price(Amount.CalculateFrom(percentage), Currency);
Exemple #5
0
 public Price ApplyDiscount(Discount discount)
 => new Price(Amount.ApplyDiscount(discount), Currency);
Exemple #6
0
 public Price ApplyTax(Tax tax)
 => new Price(Amount.ApplyTax(tax), Currency);