Package dev.ucomprotocol.spi
Interface CustomerAdapter
public interface CustomerAdapter
Adapter interface for customer management operations.
Implement this interface to connect to a commerce platform's customer data.
-
Method Summary
Modifier and TypeMethodDescriptioncreateCustomer(Customer customer) Creates a new customer.getCustomer(String id) Retrieves a customer by their ID.updateCustomer(String id, Customer customer) Updates an existing customer.
-
Method Details
-
getCustomer
Retrieves a customer by their ID.- Parameters:
id- the unique identifier of the customer- Returns:
- an
Optionalcontaining the customer if found, or empty otherwise
-
createCustomer
Creates a new customer.- Parameters:
customer- the customer data to create- Returns:
- the created customer
-
updateCustomer
Updates an existing customer.- Parameters:
id- the unique identifier of the customer to updatecustomer- the updated customer data- Returns:
- the updated customer
-