Class CustomerOrder
java.lang.Object
com.dmasone.identity.orders.domain.CustomerOrder
Order aggregate for the placement use case. The aggregate captures the
customer's purchase intent after catalog has enough information to reserve
stock for the requested product.
-
Method Summary
Modifier and TypeMethodDescriptionid()static CustomerOrderintquantity()static CustomerOrderrestore(UUID id, Long productId, int quantity, OrderStatus status, Instant createdAt, String idempotencyKey) status()
-
Method Details
-
place
public static CustomerOrder place(UUID id, Long productId, int quantity, Instant createdAt, String idempotencyKey) -
restore
public static CustomerOrder restore(UUID id, Long productId, int quantity, OrderStatus status, Instant createdAt, String idempotencyKey) -
id
-
productId
-
quantity
public int quantity() -
status
-
createdAt
-
idempotencyKey
-