parseVolumeDiscountMetaobject
parseVolumeDiscountMetaobject(
node):VolumeDiscountEntry|null
Defined in: .pnpm/@[email protected]_graphql@[email protected]_typescript@6.0.3/node_modules/@storesynk/core/dist/product/volume-discounts.d.ts:92
Parse one $app:volume_discount metaobject node. Tolerant by design (a
metaobject can be stale or hand-authored under a merchant’s own type): a
missing/blank title, a tiers json with an unknown v or an unknown
pricing.type, a structurally broken tier, or an unknown applies_to.type
all skip the WHOLE discount rather than half-rendering it; unknown extra
json keys pass through. Returns null when the node doesn’t parse.
Parameters
Section titled “Parameters”__typename
Section titled “__typename”"Metaobject"
appliesTo
Section titled “appliesTo”{ value: string | null; } | null
collections
Section titled “collections”{ references: { nodes: ({ __typename: "Product"; } | { __typename: "ProductVariant"; } | { __typename: "MediaImage"; } | { __typename: "Video"; } | { __typename: "Model3d"; } | { __typename: "Collection"; id: string; } | { __typename: "Metaobject"; } | { __typename: "GenericFile"; } | { __typename: "Article"; } | { __typename: "Page"; })[]; } | null; } | null
endsAt
Section titled “endsAt”{ value: string | null; } | null
handle
Section titled “handle”string
string
startsAt
Section titled “startsAt”{ value: string | null; } | null
status
Section titled “status”{ value: string | null; } | null
{ value: string | null; } | null
{ value: string | null; } | null
Returns
Section titled “Returns”VolumeDiscountEntry | null