Function: summarizeByAdjustmentKind()
function summarizeByAdjustmentKind(calculation: PricingCalculation<LineItemContext>): Partial<Record<AdjustmentKind, number>>;Defined in: shared/pricing/summarize-adjustments.ts:56
Sums signed delta_cents (the actual money moved — never the raw
action.value) across every line's applied[] plus the order's applied[],
bucketed by AdjustmentKind.
Limitation: base revenue from the line_item.base_price_cents fallback
(when no base-phase rule matched) has no AppliedAction and therefore does
not appear in this rollup. Consumers authoring BASE_PRICE rules get full
coverage.
Parameters
| Parameter | Type |
|---|---|
calculation | PricingCalculation<LineItemContext> |
Returns
Partial<Record<AdjustmentKind, number>>