Exemplo n.º 1
0
 public override Money On(Timestamp time) =>
 time.CompareTo(this.ValidBefore) >= 0
         ? Amount.Zero(base.Currency)
         : this;
Exemplo n.º 2
0
 public int CompareTo(Timestamp other) =>
 this.UtcTime.CompareTo(other.UtcTime);
Exemplo n.º 3
0
 public int CompareTo(Timestamp other) =>
 - other.CompareTo(this.Value);
Exemplo n.º 4
0
 public override Money On(Timestamp time) =>
 this;
Exemplo n.º 5
0
 public Money PayableAt(Money money, Amount expense, Timestamp time) =>
 money is GiftCard gift && gift.ValidBefore.CompareTo(time) < 0 ? Amount.Zero(expense.Currency)
Exemplo n.º 6
0
 public (Amount paid, Wallet remaining) Pay(Amount expense, Timestamp time) =>
 this.Moneys
Exemplo n.º 7
0
 public BankCard CardOn(Timestamp time) =>
 time.CompareTo(this.ValidBefore) >= 0
         ? (BankCard) new CardExpired(this.ValidBefore)
         : this;
Exemplo n.º 8
0
 public override Money On(Timestamp time) =>
 this.CardOn(time);