Interface CustomerStore


public interface CustomerStore
Outbound persistence port for customer registration and lookup.
  • Method Details

    • findById

      Optional<CustomerSnapshot> findById(UUID customerId)
      Finds a customer by its identifier.
      Parameters:
      customerId - customer identifier
      Returns:
      customer snapshot when present
    • saveNew

      CustomerSnapshot saveNew(UUID id, CustomerRegistration registration, CustomerStatus status, OffsetDateTime createdAt)
      Persists a new customer registration.
      Parameters:
      id - generated customer identifier
      registration - validated registration data
      status - initial customer status
      createdAt - creation timestamp
      Returns:
      saved customer snapshot
      Throws:
      ResourceConflictException - when the email is already registered