andreschaffer/event-sourcing-cqrs-examples

View on GitHub
src/main/java/bankservice/service/account/WithdrawAccountCommand.java

Summary

Maintainability
A
45 mins
Test Coverage
A
100%
package bankservice.service.account;

import static com.google.common.base.Preconditions.checkNotNull;

import java.math.BigDecimal;
import java.util.UUID;

public class WithdrawAccountCommand {

  private final UUID id;
  private final BigDecimal amount;

  public WithdrawAccountCommand(UUID id, BigDecimal amount) {
    this.id = checkNotNull(id);
    this.amount = checkNotNull(amount);
  }

  public UUID getId() {
    return id;
  }

  public BigDecimal getAmount() {
    return amount;
  }
}