Files
medusa-store/www/apps/docs/content/references/pricing/interfaces/PricingContext.md
Shahed Nasser f0af8ecc89 docs: generate pricing module reference (#5349)
* docs: generate pricing module reference

* added notes about new configurations
2023-10-11 14:08:19 +03:00

947 B

displayed_sidebar
displayed_sidebar
pricingReference

PricingContext

Used to specify the context to calculate prices. For example, you can specify the currency code to calculate prices in.

Example

To calculate prices

Properties

context

Optional context: Record<string, string | number>

an object whose keys are the name of the context attribute. Its value can be a string or a number. For example, you can pass the currency_code property with its value being the currency code to calculate the price in. Another example is passing the quantity property to calculate the price for that specified quantity, which finds a price set whose min_quantity and max_quantity conditions match the specified quantity.

Defined in

packages/types/src/pricing/common/price-set.ts:23