import { ShopifyDiscountCodeApplication } from '@daffodil/driver/shopify'
Records the configuration and intent of a discount code when a customer applies it. This includes the code string, allocation method, target type, and discount value at the time of application. The applicable field indicates whether the code was successfully applied.
Note: To see the actual amounts discounted on specific line items or shipping lines, use the
DiscountAllocationobject instead.
interface ShopifyDiscountCodeApplication {
__typename: "DiscountCodeApplication"
allocationMethod: ShopifyDiscountApplicationAllocationMethod
applicable: boolean
code: string
targetSelection: ShopifyDiscountApplicationTargetSelection
targetType: ShopifyDiscountApplicationTargetType
value: ShopifyPricingValue
}
__typename "DiscountCodeApplication" |
|---|
allocationMethod ShopifyDiscountApplicationAllocationMethod |
|---|
The method by which the discount's value is allocated to its entitled items. |
applicable boolean |
|---|
Specifies whether the discount code was applied successfully. |
code string |
|---|
The string identifying the discount code that was used at the time of application. |
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. |