Class CustomerService

java.lang.Object
com.minicrm.mini_crm_api.services.CustomerService

@Service public class CustomerService extends Object
Service for managing customers.
  • Constructor Details

    • CustomerService

      public CustomerService()
  • Method Details

    • createCustomer

      public Customer createCustomer(CustomerDTO customerDTO)
      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