Interface CustomerStore
public interface CustomerStore
Outbound persistence port for customer registration and lookup.
-
Method Summary
Modifier and TypeMethodDescriptionFinds a customer by its identifier.saveNew(UUID id, CustomerRegistration registration, CustomerStatus status, OffsetDateTime createdAt) Persists a new customer registration.
-
Method Details
-
findById
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 identifierregistration- validated registration datastatus- initial customer statuscreatedAt- creation timestamp- Returns:
- saved customer snapshot
- Throws:
ResourceConflictException- when the email is already registered
-