import { ShopifyBaseCartLine } from '@daffodil/driver/shopify'
Defines the shared fields for items in a shopping cart. Implemented by CartLine for individual merchandise and ComponentizableCartLine for grouped merchandise like bundles.
Each implementation includes the merchandise being purchased, quantity, cost breakdown, applied discounts, custom attributes, and any associated SellingPlan.
interface ShopifyBaseCartLine {
attribute: ShopifyAttribute
attributes: ShopifyAttribute[]
cost: ShopifyCartLineCost
discountAllocations: ShopifyCartDiscountAllocation[]
estimatedCost: ShopifyCartLineEstimatedCost
id: string
merchandise: ShopifyProductVariant
quantity: number
sellingPlanAllocation: ShopifySellingPlanAllocation
}
attribute ShopifyAttribute |
|---|
An attribute associated with the cart line. |
attributes ShopifyAttribute[] |
|---|
The attributes associated with the cart line. Attributes are represented as key-value pairs. |
cost ShopifyCartLineCost |
|---|
The cost of the merchandise that the buyer will pay for at checkout. The costs are subject to change and changes will be reflected at checkout. |
discountAllocations ShopifyCartDiscountAllocation[] |
|---|
The discounts that have been applied to the cart line. |
estimatedCost ShopifyCartLineEstimatedCost |
|---|
The estimated cost of the merchandise that the buyer will pay for at checkout. The estimated costs are subject to change and changes will be reflected at checkout. |
id string |
|---|
A globally-unique ID. |
merchandise ShopifyProductVariant |
|---|
The merchandise that the buyer intends to purchase. |
quantity number |
|---|
The quantity of the merchandise that the customer intends to purchase. |
sellingPlanAllocation ShopifySellingPlanAllocation |
|---|
The selling plan associated with the cart line and the effect that each selling plan has on variants when they're purchased. |