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 Money PayableAt(Money money, Amount expense, Timestamp time) => money is GiftCard gift && gift.ValidBefore.CompareTo(time) < 0 ? Amount.Zero(expense.Currency)
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);