コード例 #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));
 }
コード例 #2
0
 public static void AssignDetail(PaymentTransactionState state, string description) =>
 state.ApplyEvent(new Events.V1.TransactionDetailAssignedToTransactionDomainEvent(state.Id.ToString(), description));
コード例 #3
0
 public static void SetMoney(PaymentTransactionState state, decimal amount) =>
 state.ApplyEvent(new Events.V1.TransactionAmountChangedDomainEvent(amount));
コード例 #4
0
 public static void PaymentStatusFailed(PaymentTransactionState state) =>
 state.ApplyEvent(new Events.V1.TransactionStatusChangedDomainEvent(PaymenTransactionStatus.FailStatus.Id));