import { ShopifyDiscountApplication } from '@daffodil/driver/shopify'
Captures the intent of a discount at the time it was applied. Each implementation represents a different discount source, such as automatic discounts, discount codes, and manual discounts.
The actual discounted amount on a line item or shipping line is represented by the DiscountAllocation object, which references the discount application it originated from.
interface ShopifyDiscountApplication {
allocationMethod: ShopifyDiscountApplicationAllocationMethod
targetSelection: ShopifyDiscountApplicationTargetSelection
targetType: ShopifyDiscountApplicationTargetType
value: ShopifyPricingValue
}
allocationMethod ShopifyDiscountApplicationAllocationMethod |
|---|
The method by which the discount's value is allocated to its entitled items. |
targetSelection ShopifyDiscountApplicationTargetSelection |
|---|
Which lines of targetType that the discount is allocated over. |
targetType ShopifyDiscountApplicationTargetType |
|---|
The type of line that the discount is applicable towards. |
value ShopifyPricingValue |
|---|
The value of the discount application. |