Interface CustomerAdapter


public interface CustomerAdapter
Adapter interface for customer management operations.

Implement this interface to connect to a commerce platform's customer data.

  • Method Details

    • getCustomer

      Optional<Customer> getCustomer(String id)
      Retrieves a customer by their ID.
      Parameters:
      id - the unique identifier of the customer
      Returns:
      an Optional containing the customer if found, or empty otherwise
    • createCustomer

      Customer createCustomer(Customer customer)
      Creates a new customer.
      Parameters:
      customer - the customer data to create
      Returns:
      the created customer
    • updateCustomer

      Customer updateCustomer(String id, Customer customer)
      Updates an existing customer.
      Parameters:
      id - the unique identifier of the customer to update
      customer - the updated customer data
      Returns:
      the updated customer