ReserveStock

@Summary(value = "Reserve stock for an order")
data class ReserveStock(val orderId: String, val quantity: Int)

Holds quantity units for the order orderId until the order is shipped or cancelled. The ordering context's order-process saga sends it for each product of an order awaiting validation. It is rejected when fewer units are available, and the rejection goes back to that saga, which cancels the order.

Constructors

Link copied to clipboard
constructor(orderId: String, quantity: Int)

Properties

Link copied to clipboard
Link copied to clipboard
@Positive
val quantity: Int