Esempio n. 1
0
 public static void ChangeOrSetAmountTo(PaymentTransactionState state, Money money)
 {
     if (money._amount > 1000)
     {
         throw new DailyAmountExceedException(state.Id.ToString());
     }
     state.ApplyEvent(new Events.V1.TransactionAmountChangedDomainEvent(money._amount.Value));
 }
Esempio n. 2
0
 public static void AssignDetail(PaymentTransactionState state, string description) =>
 state.ApplyEvent(new Events.V1.TransactionDetailAssignedToTransactionDomainEvent(state.Id.ToString(), description));
Esempio n. 3
0
 public static void SetMoney(PaymentTransactionState state, decimal amount) =>
 state.ApplyEvent(new Events.V1.TransactionAmountChangedDomainEvent(amount));
Esempio n. 4
0
 public static void PaymentStatusFailed(PaymentTransactionState state) =>
 state.ApplyEvent(new Events.V1.TransactionStatusChangedDomainEvent(PaymenTransactionStatus.FailStatus.Id));