GitHub

ShopifyCartDiscountAllocation

Type

import { ShopifyCartDiscountAllocation } from '@daffodil/driver/shopify'

A common interface for querying discount allocations regardless of how the discount was applied (automatic, code, or custom). Each implementation represents a different discount source.

Tracks how a discount distributes across cart lines. Each allocation includes the CartDiscountApplication details, the discounted amount, and whether the discount targets line items or shipping.

Properties

discountApplication
ShopifyCartDiscountApplication

The discount that have been applied on the cart line.

discountedAmount
ShopifyMoneyV2

The discounted amount that has been applied to the cart line.

targetType
ShopifyDiscountApplicationTargetType

The type of line that the discount is applicable towards.