public Money PayableAt(Money money, Amount expense, Timestamp time) => money is GiftCard gift && gift.ValidBefore.CompareTo(time) < 0 ? Amount.Zero(expense.Currency)
public virtual Amount Subtract(Amount other) => other == null ? throw new ArgumentNullException(nameof(other)) : other.Currency != this.Currency ? throw new ArgumentException("Mismatched currency.") : other.Value > this.Value ? throw new ArgumentException("Insufficient funds.") : new Amount(this.Currency, this.Value - other.Value);
public virtual Amount Add(Amount other) => other == null ? throw new ArgumentNullException(nameof(other)) : other.Currency != this.Currency ? throw new ArgumentException("Mismatched currency.") : new Amount(this.Currency, this.Value + other.Value);
public (Amount paid, Wallet remaining) Pay(Amount expense, Timestamp time) => this.Moneys
public override Tuple <Amount, Money> Take(Currency currency, decimal amount) => Tuple.Create(Amount.Zero(currency), (Money)this);
public InvoiceLine(Amount basePrice, ITax tax) { BasePrice = basePrice ?? throw new ArgumentNullException(nameof(basePrice)); Tax = tax ?? throw new ArgumentNullException(nameof(tax)); }