- Supports the book browsing experience and cart management
- Scope: Public
Place the resource(s) on the proper line in the table below
- Book (two lines)
- CartItem, Cart (two lines)
- Cart (two lines)
| Operation Name | Description | Participants | Resource(s) | Emitted Events | Operation Details | Traits |
|---|---|---|---|---|---|---|
| listBooks() | List books by category or release date | Customer, Call Center | Request Parameters: categoryId, releaseDate Returns: Books[] | |||
| searchBooks() | Search for books by author, title | Customer, Call Center | Request Parameters: searchQuery Returns: Books[] | |||
| addItemToCart() | Add a book to the customer's cart | Customer, Call Center | Request Parameters: cartId, bookId, quantity Returns: Cart | |||
| removeItemFromCart() | Remove a book from the customer's cart | Customer, Call Center | Request Parameters: cartItemId Returns: Cart | |||
| clearCart() | Remove all books from the customer's cart | Customer, Call Center | Request Parameters: cartId Returns: Cart | |||
| viewCart() | View the current cart and total | Customer, Call Center | Request Parameters: cartId Returns: Cart |