This PR includes documentation that preps for v2 docs (but doesn't introduce new docs). _Note: The number of file changes in the PR is due to find-and-replace within the `references` which is unavoidable. Let me know if I should move it to another PR._ ## Changes - Change Medusa version in base OAS used for v2. - Fix to docblock generator related to not catching all path parameters. - Added typedoc plugin that generates ER Diagrams, which will be used specifically for data model references in commerce modules. - Changed OAS tool to output references in `www/apps/api-reference/specs-v2` directory when the `--v2` option is used. - Added a version switcher to the API reference to switch between V1 and V2. This switcher is enabled by an environment variable, so it won't be visible/usable at the moment. - Upgraded docusaurus to v3.0.1 - Added new Vale rules to ensure correct spelling of Medusa Admin and module names. - Added new components to the `docs-ui` package that will be used in future documentation changes.
14 lines
5.3 KiB
Plaintext
14 lines
5.3 KiB
Plaintext
---
|
|
displayed_sidebar: homepage
|
|
---
|
|
|
|
import TypeList from "@site/src/components/TypeList"
|
|
|
|
# PriceSelectionResult
|
|
|
|
The price selection result of a variant.
|
|
|
|
## Properties
|
|
|
|
<TypeList types={[{"name":"originalPrice","type":"`null` \\| `number`","description":"The original price of the variant which depends on the selected region or currency code in the context object.\nIf both region ID and currency code are available in the context object, the region has higher precedence.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"calculatedPrice","type":"`null` \\| `number`","description":"The lowest price among the prices of the product variant retrieved using the context object.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"[MoneyAmount](../../entities/classes/entities.MoneyAmount.mdx)[]","description":"All possible prices of the variant that are retrieved using the `context` object.\nIt can include its original price and its price lists if there are any.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The money amount's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date with timezone at which the resource was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date with timezone at which the resource was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date with timezone at which the resource was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The 3 character currency code that the money amount may belong to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`number`","description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"`null` \\| `number`","description":"The minimum quantity that the Money Amount applies to. If this value is not set, the Money Amount applies to all quantities.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"`null` \\| `number`","description":"The maximum quantity that the Money Amount applies to. If this value is not set, the Money Amount applies to all quantities.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_list_id","type":"`null` \\| `string`","description":"The ID of the price list that the money amount may belong to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_list","type":"`null` \\| [PriceList](../../entities/classes/entities.PriceList.mdx)","description":"The details of the price list that the money amount may belong to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"variants","type":"[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variant","type":"[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)","description":"The details of the product variant that the money amount may belong to.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"variant_id","type":"`string`","description":"The ID of the Product Variant contained in the Line Item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The region's ID","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency","type":"[Currency](../../entities/classes/entities.Currency.mdx)","description":"The details of the currency that the money amount may belong to.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"region","type":"[Region](../../entities/classes/entities.Region.mdx)","description":"The details of the region that the money amount may belong to.","optional":true,"defaultValue":"","expandable":true,"children":[]}]},{"name":"originalPriceIncludesTax","type":"`null` \\| `boolean`","description":"Whether the original price includes taxes or not. This is only available\nfor [Tax-Inclusive Pricing](https://docs.medusajs.com/modules/taxes/inclusive-pricing).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"calculatedPriceIncludesTax","type":"`null` \\| `boolean`","description":"Whether the calculated price includes taxes or not.\nThis is only available for [Tax-Inclusive Pricing](https://docs.medusajs.com/modules/taxes/inclusive-pricing).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"calculatedPriceType","type":"[PriceType](../types/medusa.PriceType.mdx)","description":"The type of price applied in `calculatedPrice`.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records" sectionTitle="PriceSelectionResult"/>
|