parent item mutations
This commit is contained in:
+13
-1
@@ -161,7 +161,19 @@ type CartGrain struct {
|
||||
Items []*CartItem `json:"items"`
|
||||
TotalPrice *Price `json:"totalPrice"`
|
||||
TotalDiscount *Price `json:"totalDiscount"`
|
||||
Processing bool `json:"processing"`
|
||||
// EvaluatedItems is the per-line promotion breakdown — see
|
||||
// EvaluatedItem for shape and semantics. Populated by the canonical
|
||||
// promotion pipeline (pkg/promotions.PromotionService.EvaluateAndApply)
|
||||
// after every successful mutation, alongside TotalDiscount and
|
||||
// AppliedPromotions, so any consumer of the grain (UCP cart response,
|
||||
// legacy /cart HTTP handler, cart-mcp, AMQP mutation feed) sees the
|
||||
// per-line discount/effective totals without re-running the engine at
|
||||
// response time. Mirrors the same shape /promotions/evaluate-with-cart
|
||||
// has returned since the breakdown feature was introduced; deliberately
|
||||
// persisted via the event-log JSON block so we don't have to re-derive
|
||||
// it on every read path (same precedent as TotalPrice/TotalDiscount).
|
||||
EvaluatedItems []EvaluatedItem `json:"evaluatedItems,omitempty"`
|
||||
Processing bool `json:"processing"`
|
||||
//PaymentInProgress uint16 `json:"paymentInProgress"`
|
||||
OrderReference string `json:"orderReference,omitempty"`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user