Class CustomerService
java.lang.Object
com.minicrm.mini_crm_api.services.CustomerService
Service for managing customers.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateCustomer(CustomerDTO customerDTO) Creates a new customer if the email does not already exist.
-
Constructor Details
-
CustomerService
public CustomerService()
-
-
Method Details
-
createCustomer
Creates a new customer if the email does not already exist.- Parameters:
customerDTO- the data transfer object containing customer details- Returns:
- the saved Customer entity
- Throws:
IllegalArgumentException- if a customer with the given email already exists
-