CartLine

cart · /core·type

A single line item in a , combining a quantity, merchandise snapshot, and line-level cost breakdown. The L generic carries optional provider-specific extensions (from ).

Properties

attributes
{ key: string; value: string }[]
cost
{ subtotal: Money; total: Money }
custom
L
discountAllocations
{ code: string; discountedAmount: Money; title: string }[]
id
string

Example

const totalItems = cart.lines.reduce((n, l) => n + l.quantity, 0);

RunCartAdapterContractOpts runCartAdapterContract CartCapabilityUnsupportedError CartError CartNotFoundError CartProviderError CartUserError CartAdapter

Sourcetypes.ts:86Edit the JSDoc directly

On this page