Basket

@Description(value = "A buyer's basket before checkout; its id is the buyer's user id")
class Basket(state: BasketState)

A buyer's basket, one per buyer: its id is the buyer's user id (AggregateIdSource.OWNER). The buyer addresses it by no id, as "mine", and the first item creates it; Wow forbids a buyer another buyer's basket, and only a caller with no owner, such as a saga or a service, names the basket by its id.

CheckoutBasket empties the basket into an order: BasketCheckoutSaga submits it to the ordering context, which numbers it (SO-261031-42).

Constructors

Link copied to clipboard
constructor(state: BasketState)

Types

Link copied to clipboard
object Rejections

The codes the aggregate rejects a command with, by their local names: the compiler and the kernel name them <context>.basket.<code>, as its peers read them from the api's generated contract.

Functions

Link copied to clipboard

Changing a quantity to the one the basket holds changes nothing.

Removing a product the basket does not hold changes nothing.