Skip to content

Instantly share code, notes, and snippets.

@mamund
Last active December 2, 2021 00:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mamund/e852adefa905a873fab7e99070e76c21 to your computer and use it in GitHub Desktop.
Save mamund/e852adefa905a873fab7e99070e76c21 to your computer and use it in GitHub Desktop.

Shopping API

  • Supports the book browsing experience and cart management
  • Scope: Public

Add Operations

Place these operations on the proper lines in the table below.

  • viewCart()
  • clearCart()
  • AddItemToCart()
  • RemoveItemFromCart()
  • listBooks()
  • searchBooks()
Operation Name Description Participants Resource(s) Emitted Events Operation Details Traits
List books by category or release date Customer, Call Center Request Parameters: categoryId, releaseDate Returns: Books[]
Search for books by author, title Customer, Call Center Request Parameters: searchQuery Returns: Books[]
Add a book to the customer's cart Customer, Call Center Request Parameters: cartId, bookId, quantity Returns: Cart
Remove a book from the customer's cart Customer, Call Center Request Parameters: cartItemId Returns: Cart
Remove all books from the customer's cart Customer, Call Center Request Parameters: cartId Returns: Cart
View the current cart and total Customer, Call Center Request Parameters: cartId Returns: Cart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment