Files
medusa-store/www/apps/resources/references/promotion/interfaces/promotion.ComputeActionContext/page.mdx
2024-12-09 15:27:01 +02:00

12 lines
4.5 KiB
Plaintext

---
displayed_sidebar: promotionReference
---
import { TypeList } from "docs-ui"
# ComputeActionContext
The context provided when computing actions of promotions.
<TypeList types={[{"name":"currency_code","type":"`string`","description":"The cart's currency","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[ComputeActionItemLine](../promotion.ComputeActionItemLine/page.mdx)[]","description":"The cart's line items.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the item line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"[BigNumberInput](../../types/promotion.BigNumberInput/page.mdx)","description":"The quantity of the line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../types/promotion.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"subtotal","type":"[BigNumberInput](../../types/promotion.BigNumberInput/page.mdx)","description":"The subtotal of the line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../types/promotion.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"adjustments","type":"[ComputeActionAdjustmentLine](../promotion.ComputeActionAdjustmentLine/page.mdx)[]","description":"The adjustments applied before on the line item.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the compute action's adjustment line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The promotion's code.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"shipping_methods","type":"[ComputeActionShippingLine](../promotion.ComputeActionShippingLine/page.mdx)[]","description":"The cart's shipping methods.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"[BigNumberInput](../../types/promotion.BigNumberInput/page.mdx)","description":"The subtotal of the shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../types/promotion.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"adjustments","type":"[ComputeActionAdjustmentLine](../promotion.ComputeActionAdjustmentLine/page.mdx)[]","description":"The adjustments applied before on the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the compute action's adjustment line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The promotion's code.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="ComputeActionContext"/>