|
1
|
{"slug":"/references/pricing/models/PriceSet","title":"PriceSet - Pricing Module Data Models Reference","frontmatter":{"displayed_sidebar":"pricingModelReference","slug":"/references/pricing/models/PriceSet","sidebar_label":"PriceSet"},"toc":[],"blocks":[{"kind":"markdown","html":"This documentation provides a reference to the PriceSet data model. It belongs to the Pricing Module."},{"kind":"sourceCodeLink","link":"https://github.com/medusajs/medusa/blob/020565398e436a2bc65777a3b1ad347b4735d6df/packages/modules/pricing/src/models/price-set.ts#L4"},{"kind":"typeList","sectionTitle":"PriceSet","types":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the price set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"HasMany<[Price](/references/pricing/models/Price)>","description":"The associated `Price` records.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The title of the price","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$dataType","type":"`string`","description":"A type-only property to infer the JavaScript data-type\nof the schema property","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"#retrievable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#providerOptions","type":"`Record<string, Record<string, unknown>>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#filterable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#sortable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#facetable","type":"`boolean` \\| `object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#array","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#searchable","type":"`boolean` \\| `object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"dataType","type":"`object`","description":"The runtime dataType for the schema. It is not the same as\nthe \"$dataType\".","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"currency_code","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The currency code of the price. For example, `usd`.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"$dataType","type":"`string`","description":"A type-only property to infer the JavaScript data-type\nof the schema property","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"#retrievable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#providerOptions","type":"`Record<string, Record<string, unknown>>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#filterable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#sortable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#facetable","type":"`boolean` \\| `object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#array","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#searchable","type":"`boolean` \\| `object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"dataType","type":"`object`","description":"The runtime dataType for the schema. It is not the same as\nthe \"$dataType\".","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"amount","type":"`BigNumberProperty`","description":"The amount of the price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"`BigNumberProperty`","description":"The minimum quantity that must be available in the cart for the price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"`BigNumberProperty`","description":"The maximum quantity allowed to be available in the cart for the price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules_count","type":"`NumberProperty`","description":"The total number of rules of the price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"price_set","type":"BelongsTo<[PriceSet](/references/pricing/models/PriceSet)>","description":"The associated `PriceSet`.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the price set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"HasMany<[Price](/references/pricing/models/Price)>","description":"The associated `Price` records.","optional":false,"defaultValue":"","expandable":true,"children":[]}]},{"name":"price_rules","type":"HasMany<[PriceRule](/references/pricing/models/PriceRule)>","description":"The associated `PriceRule` records.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the price rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"attribute","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The attribute of the price rule. For example, `region_id`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The value of the price rule. For example, `reg_123`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"operator","type":"EnumProperty<typeof [PricingRuleOperator](/references/utils/PricingUtils/enums/utils.PricingUtils.PricingRuleOperator)>","description":"The operator of the price rule. For example, `eq`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"priority","type":"`NumberProperty`","description":"The priority of the price rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price","type":"BelongsTo<[Price](/references/pricing/models/Price)>","description":"The associated `Price`.","optional":false,"defaultValue":"","expandable":true,"children":[]}]},{"name":"price_list","type":"BelongsTo<[PriceList](/references/pricing/models/PriceList)>","description":"The associated `PriceList`.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The title of the price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The description of the price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"EnumProperty<typeof [PriceListStatus](/references/utils/PricingUtils/enums/utils.PricingUtils.PriceListStatus)>","description":"The status of the price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"EnumProperty<typeof [PriceListType](/references/utils/PricingUtils/enums/utils.PricingUtils.PriceListType)>","description":"The type of the price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"starts_at","type":"`DateTimeProperty`","description":"The date the price list starts.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"ends_at","type":"`DateTimeProperty`","description":"The date the price list ends.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules_count","type":"`NumberProperty`","description":"The total number of rules of the price list.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"HasMany<[Price](/references/pricing/models/Price)>","description":"The associated `Price` records.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"price_list_rules","type":"HasMany<[PriceListRule](/references/pricing/models/PriceListRule)>","description":"The associated `PriceListRule` records.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"metadata","type":"JSONProperty<NoInfer<Record<string, unknown>>>","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]}]} |