docs: generate pricing module reference (#5349)
* docs: generate pricing module reference * added notes about new configurations
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
---
|
||||
displayed_sidebar: pricingReference
|
||||
---
|
||||
|
||||
# AddPricesDTO
|
||||
|
||||
An object used to specify prices to add to a price set.
|
||||
|
||||
## Properties
|
||||
|
||||
### priceSetId
|
||||
|
||||
**priceSetId**: `string`
|
||||
|
||||
A string indicating the ID of the price set to add prices to.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-set.ts:105](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-set.ts#L105)
|
||||
|
||||
___
|
||||
|
||||
### prices
|
||||
|
||||
**prices**: [`CreatePricesDTO`](CreatePricesDTO.md)[]
|
||||
|
||||
An array of objects of type [CreatePricesDTO](CreatePricesDTO.md), each being a price to add to the price set.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-set.ts:106](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-set.ts#L106)
|
||||
@@ -0,0 +1,31 @@
|
||||
---
|
||||
displayed_sidebar: pricingReference
|
||||
---
|
||||
|
||||
# AddRulesDTO
|
||||
|
||||
An object used to specify the rules to add to a price set.
|
||||
|
||||
## Properties
|
||||
|
||||
### priceSetId
|
||||
|
||||
**priceSetId**: `string`
|
||||
|
||||
A string indicating the ID of the price set to add the rules to.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-set.ts:81](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-set.ts#L81)
|
||||
|
||||
___
|
||||
|
||||
### rules
|
||||
|
||||
**rules**: { `attribute`: `string` }[]
|
||||
|
||||
An array of objects, each object holds a property `attribute`, with its value being the `rule_attribute` of the rule to add to the price set.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-set.ts:82](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-set.ts#L82)
|
||||
@@ -0,0 +1,53 @@
|
||||
---
|
||||
displayed_sidebar: pricingReference
|
||||
---
|
||||
|
||||
# BaseFilterable
|
||||
|
||||
An object used to allow specifying flexible queries with and/or conditions.
|
||||
|
||||
## Type parameters
|
||||
|
||||
| Name |
|
||||
| :------ |
|
||||
| `T` |
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- **`BaseFilterable`**
|
||||
|
||||
↳ [`FilterablePriceSetProps`](FilterablePriceSetProps.md)
|
||||
|
||||
↳ [`FilterableMoneyAmountProps`](FilterableMoneyAmountProps.md)
|
||||
|
||||
↳ [`FilterableCurrencyProps`](FilterableCurrencyProps.md)
|
||||
|
||||
↳ [`FilterableRuleTypeProps`](FilterableRuleTypeProps.md)
|
||||
|
||||
↳ [`FilterablePriceSetMoneyAmountRulesProps`](FilterablePriceSetMoneyAmountRulesProps.md)
|
||||
|
||||
↳ [`FilterablePriceRuleProps`](FilterablePriceRuleProps.md)
|
||||
|
||||
## Properties
|
||||
|
||||
### $and
|
||||
|
||||
`Optional` **$and**: (`T` \| [`BaseFilterable`](BaseFilterable.md)<`T`\>)[]
|
||||
|
||||
An array of filters to apply on the entity, where each item in the array is joined with an "and" condition.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/dal/index.ts:14](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/dal/index.ts#L14)
|
||||
|
||||
___
|
||||
|
||||
### $or
|
||||
|
||||
`Optional` **$or**: (`T` \| [`BaseFilterable`](BaseFilterable.md)<`T`\>)[]
|
||||
|
||||
An array of filters to apply on the entity, where each item in the array is joined with an "or" condition.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/dal/index.ts:15](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/dal/index.ts#L15)
|
||||
@@ -0,0 +1,67 @@
|
||||
---
|
||||
displayed_sidebar: pricingReference
|
||||
---
|
||||
|
||||
# CalculatedPriceSetDTO
|
||||
|
||||
An object that holds the details of a calculated price set.
|
||||
|
||||
## Properties
|
||||
|
||||
### amount
|
||||
|
||||
**amount**: ``null`` \| `number`
|
||||
|
||||
a number indicating the calculated amount. It can possibly be `null` if there's no price set up for the provided context.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-set.ts:66](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-set.ts#L66)
|
||||
|
||||
___
|
||||
|
||||
### currency\_code
|
||||
|
||||
**currency\_code**: ``null`` \| `string`
|
||||
|
||||
a string indicating the currency code of the calculated price. It can possibly be `null`.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-set.ts:67](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-set.ts#L67)
|
||||
|
||||
___
|
||||
|
||||
### id
|
||||
|
||||
**id**: `string`
|
||||
|
||||
a string indicating the ID of the price set.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-set.ts:65](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-set.ts#L65)
|
||||
|
||||
___
|
||||
|
||||
### max\_quantity
|
||||
|
||||
**max\_quantity**: ``null`` \| `number`
|
||||
|
||||
a number indicaitng the maximum quantity required to be purchased for this price to apply. It's set if the `quantity` property is provided in the context. Otherwise, its value will be `null`.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-set.ts:69](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-set.ts#L69)
|
||||
|
||||
___
|
||||
|
||||
### min\_quantity
|
||||
|
||||
**min\_quantity**: ``null`` \| `number`
|
||||
|
||||
a number indicaitng the minimum quantity required to be purchased for this price to apply. It's set if the `quantity` property is provided in the context. Otherwise, its value will be `null`.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-set.ts:68](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-set.ts#L68)
|
||||
@@ -0,0 +1,75 @@
|
||||
---
|
||||
displayed_sidebar: pricingReference
|
||||
---
|
||||
|
||||
# Context
|
||||
|
||||
The interface tag is used to ensure that the type is documented similar to interfaces.
|
||||
|
||||
A shared context object that is used to share resources between the application and the module.
|
||||
|
||||
## Type parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `TManager` | `unknown` |
|
||||
|
||||
## Properties
|
||||
|
||||
### enableNestedTransactions
|
||||
|
||||
`Optional` **enableNestedTransactions**: `boolean`
|
||||
|
||||
a boolean value indicating whether nested transactions are enabled.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/shared-context.ts:24](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/shared-context.ts#L24)
|
||||
|
||||
___
|
||||
|
||||
### isolationLevel
|
||||
|
||||
`Optional` **isolationLevel**: `string`
|
||||
|
||||
A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/shared-context.ts:23](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/shared-context.ts#L23)
|
||||
|
||||
___
|
||||
|
||||
### manager
|
||||
|
||||
`Optional` **manager**: `TManager`
|
||||
|
||||
An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/shared-context.ts:22](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/shared-context.ts#L22)
|
||||
|
||||
___
|
||||
|
||||
### transactionId
|
||||
|
||||
`Optional` **transactionId**: `string`
|
||||
|
||||
a string indicating the ID of the current transaction.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/shared-context.ts:25](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/shared-context.ts#L25)
|
||||
|
||||
___
|
||||
|
||||
### transactionManager
|
||||
|
||||
`Optional` **transactionManager**: `TManager`
|
||||
|
||||
An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/shared-context.ts:21](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/shared-context.ts#L21)
|
||||
@@ -0,0 +1,56 @@
|
||||
---
|
||||
displayed_sidebar: pricingReference
|
||||
---
|
||||
|
||||
# CreateCurrencyDTO
|
||||
|
||||
An object that holds data to create a currency.
|
||||
|
||||
## Properties
|
||||
|
||||
### code
|
||||
|
||||
**code**: `string`
|
||||
|
||||
a string indicating the code of the currency.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/currency.ts:35](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/currency.ts#L35)
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
**name**: `string`
|
||||
|
||||
a string indicating the name of the currency.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/currency.ts:38](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/currency.ts#L38)
|
||||
|
||||
___
|
||||
|
||||
### symbol
|
||||
|
||||
**symbol**: `string`
|
||||
|
||||
a string indicating the symbol of the currency.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/currency.ts:36](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/currency.ts#L36)
|
||||
|
||||
___
|
||||
|
||||
### symbol\_native
|
||||
|
||||
**symbol\_native**: `string`
|
||||
|
||||
a string indicating the symbol of the currecy in its native form.
|
||||
This is typically the symbol used when displaying a price.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/currency.ts:37](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/currency.ts#L37)
|
||||
@@ -0,0 +1,87 @@
|
||||
---
|
||||
displayed_sidebar: pricingReference
|
||||
---
|
||||
|
||||
# CreateMoneyAmountDTO
|
||||
|
||||
*
|
||||
|
||||
An object that holds data to create a money amount.
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- **`CreateMoneyAmountDTO`**
|
||||
|
||||
↳ [`CreatePricesDTO`](CreatePricesDTO.md)
|
||||
|
||||
## Properties
|
||||
|
||||
### amount
|
||||
|
||||
`Optional` **amount**: `number`
|
||||
|
||||
A number indicating the amount of this money amount.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/money-amount.ts:41](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/money-amount.ts#L41)
|
||||
|
||||
___
|
||||
|
||||
### currency
|
||||
|
||||
`Optional` **currency**: [`CreateCurrencyDTO`](CreateCurrencyDTO.md)
|
||||
|
||||
An object of type [CurrencyDTO](CurrencyDTO.md) that holds the details of the money amount's currency. Since this is a relation, it will only be retrieved if it's passed to the `relations` array of the find-configuration options.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/money-amount.ts:40](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/money-amount.ts#L40)
|
||||
|
||||
___
|
||||
|
||||
### currency\_code
|
||||
|
||||
**currency\_code**: `string`
|
||||
|
||||
A string that indicates the currency code of this money amount.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/money-amount.ts:39](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/money-amount.ts#L39)
|
||||
|
||||
___
|
||||
|
||||
### id
|
||||
|
||||
`Optional` **id**: `string`
|
||||
|
||||
A string that indicates the ID of the money amount.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/money-amount.ts:38](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/money-amount.ts#L38)
|
||||
|
||||
___
|
||||
|
||||
### max\_quantity
|
||||
|
||||
`Optional` **max\_quantity**: `number`
|
||||
|
||||
A number that indicates the maximum quantity required to be purchased for this money amount to be applied.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/money-amount.ts:43](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/money-amount.ts#L43)
|
||||
|
||||
___
|
||||
|
||||
### min\_quantity
|
||||
|
||||
`Optional` **min\_quantity**: `number`
|
||||
|
||||
A number that indicates the minimum quantity required to be purchased for this money amount to be applied.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/money-amount.ts:42](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/money-amount.ts#L42)
|
||||
@@ -0,0 +1,103 @@
|
||||
---
|
||||
displayed_sidebar: pricingReference
|
||||
---
|
||||
|
||||
# CreatePriceRuleDTO
|
||||
|
||||
An object used to specify the necessary data to create a price rule.
|
||||
|
||||
## Properties
|
||||
|
||||
### id
|
||||
|
||||
**id**: `string`
|
||||
|
||||
A string indicating the ID of the price rule.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-rule.ts:50](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-rule.ts#L50)
|
||||
|
||||
___
|
||||
|
||||
### is\_dynamic
|
||||
|
||||
`Optional` **is\_dynamic**: `boolean`
|
||||
|
||||
A boolean indicating whether the price rule is dynamic.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-rule.ts:53](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-rule.ts#L53)
|
||||
|
||||
___
|
||||
|
||||
### price\_list\_id
|
||||
|
||||
**price\_list\_id**: `string`
|
||||
|
||||
A string indicating the ID of the associated price list.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-rule.ts:57](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-rule.ts#L57)
|
||||
|
||||
___
|
||||
|
||||
### price\_set\_id
|
||||
|
||||
**price\_set\_id**: `string`
|
||||
|
||||
A string indicating the ID of the associated price set.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-rule.ts:51](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-rule.ts#L51)
|
||||
|
||||
___
|
||||
|
||||
### price\_set\_money\_amount\_id
|
||||
|
||||
**price\_set\_money\_amount\_id**: `string`
|
||||
|
||||
A string indicating the ID of the associated price set money amount.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-rule.ts:56](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-rule.ts#L56)
|
||||
|
||||
___
|
||||
|
||||
### priority
|
||||
|
||||
`Optional` **priority**: `number`
|
||||
|
||||
A number indicating the priority of the price rule in comparison to other applicable price rules.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-rule.ts:55](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-rule.ts#L55)
|
||||
|
||||
___
|
||||
|
||||
### rule\_type\_id
|
||||
|
||||
**rule\_type\_id**: `string`
|
||||
|
||||
A string indicating the ID of the associated rule type.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-rule.ts:52](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-rule.ts#L52)
|
||||
|
||||
___
|
||||
|
||||
### value
|
||||
|
||||
**value**: `string`
|
||||
|
||||
A string indicating the value of the price rule.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-rule.ts:54](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-rule.ts#L54)
|
||||
@@ -0,0 +1,32 @@
|
||||
---
|
||||
displayed_sidebar: pricingReference
|
||||
---
|
||||
|
||||
# CreatePriceSetDTO
|
||||
|
||||
An object of expected properties when creating a price set.
|
||||
|
||||
## Properties
|
||||
|
||||
### prices
|
||||
|
||||
`Optional` **prices**: [`CreatePricesDTO`](CreatePricesDTO.md)[]
|
||||
|
||||
An array of objects of type [CreatePricesDTO](CreatePricesDTO.md), each being a price to associate with the price set.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-set.ts:134](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-set.ts#L134)
|
||||
|
||||
___
|
||||
|
||||
### rules
|
||||
|
||||
`Optional` **rules**: { `rule_attribute`: `string` }[]
|
||||
|
||||
An array of objects, each object accepts a property `rule_attribute`, whose value is a string indicating the `rule_attribute` value of a rule type.
|
||||
This property is used to specify the rule types associated with the price set.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-set.ts:133](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-set.ts#L133)
|
||||
@@ -0,0 +1,43 @@
|
||||
---
|
||||
displayed_sidebar: pricingReference
|
||||
---
|
||||
|
||||
# CreatePriceSetMoneyAmountRulesDTO
|
||||
|
||||
An object used to create a price set money amount rule, which represents an association between a price set money amount and a rule type.
|
||||
|
||||
## Properties
|
||||
|
||||
### price\_set\_money\_amount
|
||||
|
||||
**price\_set\_money\_amount**: `string`
|
||||
|
||||
A string indicating the ID of a price set money amount.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-set-money-amount-rules.ts:32](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-set-money-amount-rules.ts#L32)
|
||||
|
||||
___
|
||||
|
||||
### rule\_type
|
||||
|
||||
**rule\_type**: `string`
|
||||
|
||||
A string indicating the ID of a rule type.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-set-money-amount-rules.ts:33](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-set-money-amount-rules.ts#L33)
|
||||
|
||||
___
|
||||
|
||||
### value
|
||||
|
||||
**value**: `string`
|
||||
|
||||
A string indicating the value of the price set money amount rule.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-set-money-amount-rules.ts:34](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-set-money-amount-rules.ts#L34)
|
||||
@@ -0,0 +1,121 @@
|
||||
---
|
||||
displayed_sidebar: pricingReference
|
||||
---
|
||||
|
||||
# CreatePricesDTO
|
||||
|
||||
An object used to pass prices data when creating a price set.
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`CreateMoneyAmountDTO`](CreateMoneyAmountDTO.md)
|
||||
|
||||
↳ **`CreatePricesDTO`**
|
||||
|
||||
## Properties
|
||||
|
||||
### amount
|
||||
|
||||
`Optional` **amount**: `number`
|
||||
|
||||
A number indicating the amount of this money amount.
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[CreateMoneyAmountDTO](CreateMoneyAmountDTO.md).[amount](CreateMoneyAmountDTO.md#amount)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/money-amount.ts:41](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/money-amount.ts#L41)
|
||||
|
||||
___
|
||||
|
||||
### currency
|
||||
|
||||
`Optional` **currency**: [`CreateCurrencyDTO`](CreateCurrencyDTO.md)
|
||||
|
||||
An object of type [CurrencyDTO](CurrencyDTO.md) that holds the details of the money amount's currency. Since this is a relation, it will only be retrieved if it's passed to the `relations` array of the find-configuration options.
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[CreateMoneyAmountDTO](CreateMoneyAmountDTO.md).[currency](CreateMoneyAmountDTO.md#currency)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/money-amount.ts:40](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/money-amount.ts#L40)
|
||||
|
||||
___
|
||||
|
||||
### currency\_code
|
||||
|
||||
**currency\_code**: `string`
|
||||
|
||||
A string that indicates the currency code of this money amount.
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[CreateMoneyAmountDTO](CreateMoneyAmountDTO.md).[currency_code](CreateMoneyAmountDTO.md#currency_code)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/money-amount.ts:39](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/money-amount.ts#L39)
|
||||
|
||||
___
|
||||
|
||||
### id
|
||||
|
||||
`Optional` **id**: `string`
|
||||
|
||||
A string that indicates the ID of the money amount.
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[CreateMoneyAmountDTO](CreateMoneyAmountDTO.md).[id](CreateMoneyAmountDTO.md#id)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/money-amount.ts:38](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/money-amount.ts#L38)
|
||||
|
||||
___
|
||||
|
||||
### max\_quantity
|
||||
|
||||
`Optional` **max\_quantity**: `number`
|
||||
|
||||
A number that indicates the maximum quantity required to be purchased for this money amount to be applied.
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[CreateMoneyAmountDTO](CreateMoneyAmountDTO.md).[max_quantity](CreateMoneyAmountDTO.md#max_quantity)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/money-amount.ts:43](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/money-amount.ts#L43)
|
||||
|
||||
___
|
||||
|
||||
### min\_quantity
|
||||
|
||||
`Optional` **min\_quantity**: `number`
|
||||
|
||||
A number that indicates the minimum quantity required to be purchased for this money amount to be applied.
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[CreateMoneyAmountDTO](CreateMoneyAmountDTO.md).[min_quantity](CreateMoneyAmountDTO.md#min_quantity)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/money-amount.ts:42](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/money-amount.ts#L42)
|
||||
|
||||
___
|
||||
|
||||
### rules
|
||||
|
||||
**rules**: [`Record`](../types/Record.md)<`string`, `string`\>
|
||||
|
||||
An object whose keys are rule types' `rule_attribute` attribute, and values are the value of that rule associated with this price.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-set.ts:93](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-set.ts#L93)
|
||||
@@ -0,0 +1,55 @@
|
||||
---
|
||||
displayed_sidebar: pricingReference
|
||||
---
|
||||
|
||||
# CreateRuleTypeDTO
|
||||
|
||||
An object used when creating a rule type to specify its data.
|
||||
|
||||
## Properties
|
||||
|
||||
### default\_priority
|
||||
|
||||
`Optional` **default\_priority**: `number`
|
||||
|
||||
A number indicating the priority of the rule type. This is useful when calculating the price of a price set, and multiple rules satisfy the provided context. The higher the value, the higher the priority of the rule type.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/rule-type.ts:34](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/rule-type.ts#L34)
|
||||
|
||||
___
|
||||
|
||||
### id
|
||||
|
||||
`Optional` **id**: `string`
|
||||
|
||||
A string indicating the ID of the rule type.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/rule-type.ts:31](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/rule-type.ts#L31)
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
**name**: `string`
|
||||
|
||||
A string indicating the display name of the rule type.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/rule-type.ts:32](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/rule-type.ts#L32)
|
||||
|
||||
___
|
||||
|
||||
### rule\_attribute
|
||||
|
||||
**rule\_attribute**: `string`
|
||||
|
||||
A string indicating a unique name used to later identify the rule_attribute. For example, it can be used in the `context` parameter of the `calculatePrices` method to specify a rule for calculating the price.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/rule-type.ts:33](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/rule-type.ts#L33)
|
||||
@@ -0,0 +1,56 @@
|
||||
---
|
||||
displayed_sidebar: pricingReference
|
||||
---
|
||||
|
||||
# CurrencyDTO
|
||||
|
||||
An object representing a currency.
|
||||
|
||||
## Properties
|
||||
|
||||
### code
|
||||
|
||||
**code**: `string`
|
||||
|
||||
a string indicating the code of the currency.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/currency.ts:16](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/currency.ts#L16)
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
`Optional` **name**: `string`
|
||||
|
||||
a string indicating the name of the currency.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/currency.ts:19](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/currency.ts#L19)
|
||||
|
||||
___
|
||||
|
||||
### symbol
|
||||
|
||||
`Optional` **symbol**: `string`
|
||||
|
||||
a string indicating the symbol of the currency.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/currency.ts:17](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/currency.ts#L17)
|
||||
|
||||
___
|
||||
|
||||
### symbol\_native
|
||||
|
||||
`Optional` **symbol\_native**: `string`
|
||||
|
||||
a string indicating the symbol of the currecy in its native form.
|
||||
This is typically the symbol used when displaying a price.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/currency.ts:18](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/currency.ts#L18)
|
||||
@@ -0,0 +1,57 @@
|
||||
---
|
||||
displayed_sidebar: pricingReference
|
||||
---
|
||||
|
||||
# FilterableCurrencyProps
|
||||
|
||||
An object used to filter retrieved currencies.
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`BaseFilterable`](BaseFilterable.md)<[`FilterableCurrencyProps`](FilterableCurrencyProps.md)\>
|
||||
|
||||
↳ **`FilterableCurrencyProps`**
|
||||
|
||||
## Properties
|
||||
|
||||
### $and
|
||||
|
||||
`Optional` **$and**: ([`FilterableCurrencyProps`](FilterableCurrencyProps.md) \| [`BaseFilterable`](BaseFilterable.md)<[`FilterableCurrencyProps`](FilterableCurrencyProps.md)\>)[]
|
||||
|
||||
An array of filters to apply on the entity, where each item in the array is joined with an "and" condition.
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[BaseFilterable](BaseFilterable.md).[$and](BaseFilterable.md#$and)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/dal/index.ts:14](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/dal/index.ts#L14)
|
||||
|
||||
___
|
||||
|
||||
### $or
|
||||
|
||||
`Optional` **$or**: ([`FilterableCurrencyProps`](FilterableCurrencyProps.md) \| [`BaseFilterable`](BaseFilterable.md)<[`FilterableCurrencyProps`](FilterableCurrencyProps.md)\>)[]
|
||||
|
||||
An array of filters to apply on the entity, where each item in the array is joined with an "or" condition.
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[BaseFilterable](BaseFilterable.md).[$or](BaseFilterable.md#$or)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/dal/index.ts:15](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/dal/index.ts#L15)
|
||||
|
||||
___
|
||||
|
||||
### code
|
||||
|
||||
`Optional` **code**: `string`[]
|
||||
|
||||
an array of strings, each being a currency code to filter the currencies.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/currency.ts:69](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/currency.ts#L69)
|
||||
@@ -0,0 +1,69 @@
|
||||
---
|
||||
displayed_sidebar: pricingReference
|
||||
---
|
||||
|
||||
# FilterableMoneyAmountProps
|
||||
|
||||
An object that can be used to filter money amounts.
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`BaseFilterable`](BaseFilterable.md)<[`FilterableMoneyAmountProps`](FilterableMoneyAmountProps.md)\>
|
||||
|
||||
↳ **`FilterableMoneyAmountProps`**
|
||||
|
||||
## Properties
|
||||
|
||||
### $and
|
||||
|
||||
`Optional` **$and**: ([`FilterableMoneyAmountProps`](FilterableMoneyAmountProps.md) \| [`BaseFilterable`](BaseFilterable.md)<[`FilterableMoneyAmountProps`](FilterableMoneyAmountProps.md)\>)[]
|
||||
|
||||
An array of filters to apply on the entity, where each item in the array is joined with an "and" condition.
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[BaseFilterable](BaseFilterable.md).[$and](BaseFilterable.md#$and)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/dal/index.ts:14](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/dal/index.ts#L14)
|
||||
|
||||
___
|
||||
|
||||
### $or
|
||||
|
||||
`Optional` **$or**: ([`FilterableMoneyAmountProps`](FilterableMoneyAmountProps.md) \| [`BaseFilterable`](BaseFilterable.md)<[`FilterableMoneyAmountProps`](FilterableMoneyAmountProps.md)\>)[]
|
||||
|
||||
An array of filters to apply on the entity, where each item in the array is joined with an "or" condition.
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[BaseFilterable](BaseFilterable.md).[$or](BaseFilterable.md#$or)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/dal/index.ts:15](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/dal/index.ts#L15)
|
||||
|
||||
___
|
||||
|
||||
### currency\_code
|
||||
|
||||
`Optional` **currency\_code**: `string` \| `string`[]
|
||||
|
||||
A string or an array of strings, each being a currency code to filter money amounts.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/money-amount.ts:77](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/money-amount.ts#L77)
|
||||
|
||||
___
|
||||
|
||||
### id
|
||||
|
||||
`Optional` **id**: `string`[]
|
||||
|
||||
An array of strings, each being an ID to filter money amounts.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/money-amount.ts:76](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/money-amount.ts#L76)
|
||||
@@ -0,0 +1,93 @@
|
||||
---
|
||||
displayed_sidebar: pricingReference
|
||||
---
|
||||
|
||||
# FilterablePriceRuleProps
|
||||
|
||||
An object used to filter price rules when retrieving them.
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`BaseFilterable`](BaseFilterable.md)<[`FilterablePriceRuleProps`](FilterablePriceRuleProps.md)\>
|
||||
|
||||
↳ **`FilterablePriceRuleProps`**
|
||||
|
||||
## Properties
|
||||
|
||||
### $and
|
||||
|
||||
`Optional` **$and**: ([`FilterablePriceRuleProps`](FilterablePriceRuleProps.md) \| [`BaseFilterable`](BaseFilterable.md)<[`FilterablePriceRuleProps`](FilterablePriceRuleProps.md)\>)[]
|
||||
|
||||
An array of filters to apply on the entity, where each item in the array is joined with an "and" condition.
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[BaseFilterable](BaseFilterable.md).[$and](BaseFilterable.md#$and)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/dal/index.ts:14](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/dal/index.ts#L14)
|
||||
|
||||
___
|
||||
|
||||
### $or
|
||||
|
||||
`Optional` **$or**: ([`FilterablePriceRuleProps`](FilterablePriceRuleProps.md) \| [`BaseFilterable`](BaseFilterable.md)<[`FilterablePriceRuleProps`](FilterablePriceRuleProps.md)\>)[]
|
||||
|
||||
An array of filters to apply on the entity, where each item in the array is joined with an "or" condition.
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[BaseFilterable](BaseFilterable.md).[$or](BaseFilterable.md#$or)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/dal/index.ts:15](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/dal/index.ts#L15)
|
||||
|
||||
___
|
||||
|
||||
### id
|
||||
|
||||
`Optional` **id**: `string`[]
|
||||
|
||||
An array of strings, each indicating an ID to filter price rules.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-rule.ts:103](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-rule.ts#L103)
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
`Optional` **name**: `string`[]
|
||||
|
||||
An array of strings, each indicating a name to filter price rules.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-rule.ts:104](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-rule.ts#L104)
|
||||
|
||||
___
|
||||
|
||||
### price\_set\_id
|
||||
|
||||
`Optional` **price\_set\_id**: `string`[]
|
||||
|
||||
An array of strings, each indicating a price set ID to filter price rules.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-rule.ts:105](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-rule.ts#L105)
|
||||
|
||||
___
|
||||
|
||||
### rule\_type\_id
|
||||
|
||||
`Optional` **rule\_type\_id**: `string`[]
|
||||
|
||||
An array of strings, each indicating a rule type ID to filter rule types.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-rule.ts:106](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-rule.ts#L106)
|
||||
@@ -0,0 +1,93 @@
|
||||
---
|
||||
displayed_sidebar: pricingReference
|
||||
---
|
||||
|
||||
# FilterablePriceSetMoneyAmountRulesProps
|
||||
|
||||
An object used to filter price set money amount rules when listing them.
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`BaseFilterable`](BaseFilterable.md)<[`FilterablePriceSetMoneyAmountRulesProps`](FilterablePriceSetMoneyAmountRulesProps.md)\>
|
||||
|
||||
↳ **`FilterablePriceSetMoneyAmountRulesProps`**
|
||||
|
||||
## Properties
|
||||
|
||||
### $and
|
||||
|
||||
`Optional` **$and**: ([`FilterablePriceSetMoneyAmountRulesProps`](FilterablePriceSetMoneyAmountRulesProps.md) \| [`BaseFilterable`](BaseFilterable.md)<[`FilterablePriceSetMoneyAmountRulesProps`](FilterablePriceSetMoneyAmountRulesProps.md)\>)[]
|
||||
|
||||
An array of filters to apply on the entity, where each item in the array is joined with an "and" condition.
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[BaseFilterable](BaseFilterable.md).[$and](BaseFilterable.md#$and)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/dal/index.ts:14](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/dal/index.ts#L14)
|
||||
|
||||
___
|
||||
|
||||
### $or
|
||||
|
||||
`Optional` **$or**: ([`FilterablePriceSetMoneyAmountRulesProps`](FilterablePriceSetMoneyAmountRulesProps.md) \| [`BaseFilterable`](BaseFilterable.md)<[`FilterablePriceSetMoneyAmountRulesProps`](FilterablePriceSetMoneyAmountRulesProps.md)\>)[]
|
||||
|
||||
An array of filters to apply on the entity, where each item in the array is joined with an "or" condition.
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[BaseFilterable](BaseFilterable.md).[$or](BaseFilterable.md#$or)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/dal/index.ts:15](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/dal/index.ts#L15)
|
||||
|
||||
___
|
||||
|
||||
### id
|
||||
|
||||
`Optional` **id**: `string`[]
|
||||
|
||||
An array of strings, each string indicating an ID to filter the price set money amount rules.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-set-money-amount-rules.ts:66](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-set-money-amount-rules.ts#L66)
|
||||
|
||||
___
|
||||
|
||||
### price\_set\_money\_amount\_id
|
||||
|
||||
`Optional` **price\_set\_money\_amount\_id**: `string`[]
|
||||
|
||||
an array of strings, each string indicating the ID of a price set money amount to filter the price set money amount rules.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-set-money-amount-rules.ts:68](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-set-money-amount-rules.ts#L68)
|
||||
|
||||
___
|
||||
|
||||
### rule\_type\_id
|
||||
|
||||
`Optional` **rule\_type\_id**: `string`[]
|
||||
|
||||
An array of strings, each string indicating the ID of a rule type to filter the price set money amount rules.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-set-money-amount-rules.ts:67](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-set-money-amount-rules.ts#L67)
|
||||
|
||||
___
|
||||
|
||||
### value
|
||||
|
||||
`Optional` **value**: `string`[]
|
||||
|
||||
an array of strings, each string indicating a value to filter the price set money amount rules.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-set-money-amount-rules.ts:69](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-set-money-amount-rules.ts#L69)
|
||||
@@ -0,0 +1,69 @@
|
||||
---
|
||||
displayed_sidebar: pricingReference
|
||||
---
|
||||
|
||||
# FilterablePriceSetProps
|
||||
|
||||
An object that can be used to specify filters on price sets.
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`BaseFilterable`](BaseFilterable.md)<[`FilterablePriceSetProps`](FilterablePriceSetProps.md)\>
|
||||
|
||||
↳ **`FilterablePriceSetProps`**
|
||||
|
||||
## Properties
|
||||
|
||||
### $and
|
||||
|
||||
`Optional` **$and**: ([`FilterablePriceSetProps`](FilterablePriceSetProps.md) \| [`BaseFilterable`](BaseFilterable.md)<[`FilterablePriceSetProps`](FilterablePriceSetProps.md)\>)[]
|
||||
|
||||
An array of filters to apply on the entity, where each item in the array is joined with an "and" condition.
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[BaseFilterable](BaseFilterable.md).[$and](BaseFilterable.md#$and)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/dal/index.ts:14](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/dal/index.ts#L14)
|
||||
|
||||
___
|
||||
|
||||
### $or
|
||||
|
||||
`Optional` **$or**: ([`FilterablePriceSetProps`](FilterablePriceSetProps.md) \| [`BaseFilterable`](BaseFilterable.md)<[`FilterablePriceSetProps`](FilterablePriceSetProps.md)\>)[]
|
||||
|
||||
An array of filters to apply on the entity, where each item in the array is joined with an "or" condition.
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[BaseFilterable](BaseFilterable.md).[$or](BaseFilterable.md#$or)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/dal/index.ts:15](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/dal/index.ts#L15)
|
||||
|
||||
___
|
||||
|
||||
### id
|
||||
|
||||
`Optional` **id**: `string`[]
|
||||
|
||||
An array of strings, each being an ID to filter price sets.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-set.ts:158](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-set.ts#L158)
|
||||
|
||||
___
|
||||
|
||||
### money\_amounts
|
||||
|
||||
`Optional` **money\_amounts**: [`FilterableMoneyAmountProps`](FilterableMoneyAmountProps.md)
|
||||
|
||||
An object of type [FilterableMoneyAmountProps](FilterableMoneyAmountProps.md) that is used to filter the price sets by their associated money amounts.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-set.ts:159](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-set.ts#L159)
|
||||
@@ -0,0 +1,81 @@
|
||||
---
|
||||
displayed_sidebar: pricingReference
|
||||
---
|
||||
|
||||
# FilterableRuleTypeProps
|
||||
|
||||
An object used to filter retrieved rule types.
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`BaseFilterable`](BaseFilterable.md)<[`FilterableRuleTypeProps`](FilterableRuleTypeProps.md)\>
|
||||
|
||||
↳ **`FilterableRuleTypeProps`**
|
||||
|
||||
## Properties
|
||||
|
||||
### $and
|
||||
|
||||
`Optional` **$and**: ([`FilterableRuleTypeProps`](FilterableRuleTypeProps.md) \| [`BaseFilterable`](BaseFilterable.md)<[`FilterableRuleTypeProps`](FilterableRuleTypeProps.md)\>)[]
|
||||
|
||||
An array of filters to apply on the entity, where each item in the array is joined with an "and" condition.
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[BaseFilterable](BaseFilterable.md).[$and](BaseFilterable.md#$and)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/dal/index.ts:14](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/dal/index.ts#L14)
|
||||
|
||||
___
|
||||
|
||||
### $or
|
||||
|
||||
`Optional` **$or**: ([`FilterableRuleTypeProps`](FilterableRuleTypeProps.md) \| [`BaseFilterable`](BaseFilterable.md)<[`FilterableRuleTypeProps`](FilterableRuleTypeProps.md)\>)[]
|
||||
|
||||
An array of filters to apply on the entity, where each item in the array is joined with an "or" condition.
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[BaseFilterable](BaseFilterable.md).[$or](BaseFilterable.md#$or)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/dal/index.ts:15](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/dal/index.ts#L15)
|
||||
|
||||
___
|
||||
|
||||
### id
|
||||
|
||||
`Optional` **id**: `string`[]
|
||||
|
||||
an array of strings, each being an ID to filter rule types.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/rule-type.ts:65](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/rule-type.ts#L65)
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
`Optional` **name**: `string`[]
|
||||
|
||||
an array of strings, each being a name to filter rule types.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/rule-type.ts:66](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/rule-type.ts#L66)
|
||||
|
||||
___
|
||||
|
||||
### rule\_attribute
|
||||
|
||||
`Optional` **rule\_attribute**: `string`[]
|
||||
|
||||
an array of strings, each being a rule attribute to filter rule types.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/rule-type.ts:67](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/rule-type.ts#L67)
|
||||
@@ -0,0 +1,92 @@
|
||||
---
|
||||
displayed_sidebar: pricingReference
|
||||
---
|
||||
|
||||
# FindConfig
|
||||
|
||||
An object that is used to configure how an entity is retrieved from the database. It accepts as a typed parameter an `Entity` class,
|
||||
which provides correct typing of field names in its properties.
|
||||
|
||||
## Type parameters
|
||||
|
||||
| Name |
|
||||
| :------ |
|
||||
| `Entity` |
|
||||
|
||||
## Properties
|
||||
|
||||
### order
|
||||
|
||||
`Optional` **order**: `Object`
|
||||
|
||||
An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`
|
||||
to sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.
|
||||
|
||||
#### Index signature
|
||||
|
||||
▪ [K: `string`]: ``"ASC"`` \| ``"DESC"``
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/common/common.ts:64](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/common/common.ts#L64)
|
||||
|
||||
___
|
||||
|
||||
### relations
|
||||
|
||||
`Optional` **relations**: `string`[]
|
||||
|
||||
An array of strings, each being relation names of the entity to retrieve in the result.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/common/common.ts:63](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/common/common.ts#L63)
|
||||
|
||||
___
|
||||
|
||||
### select
|
||||
|
||||
`Optional` **select**: (`string` \| keyof `Entity`)[]
|
||||
|
||||
An array of strings, each being attribute names of the entity to retrieve in the result.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/common/common.ts:60](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/common/common.ts#L60)
|
||||
|
||||
___
|
||||
|
||||
### skip
|
||||
|
||||
`Optional` **skip**: `number`
|
||||
|
||||
A number indicating the number of records to skip before retrieving the results.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/common/common.ts:61](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/common/common.ts#L61)
|
||||
|
||||
___
|
||||
|
||||
### take
|
||||
|
||||
`Optional` **take**: `number`
|
||||
|
||||
A number indicating the number of records to return in the result.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/common/common.ts:62](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/common/common.ts#L62)
|
||||
|
||||
___
|
||||
|
||||
### withDeleted
|
||||
|
||||
`Optional` **withDeleted**: `boolean`
|
||||
|
||||
A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the
|
||||
`SoftDeletableEntity` class.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/common/common.ts:65](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/common/common.ts#L65)
|
||||
@@ -0,0 +1,53 @@
|
||||
---
|
||||
displayed_sidebar: pricingReference
|
||||
badge:
|
||||
variant: orange
|
||||
text: Beta
|
||||
slug: /references/pricing
|
||||
---
|
||||
|
||||
# IPricingModuleService Reference
|
||||
|
||||
This section of the documentation provides a reference to the `IPricingModuleService` interface’s methods. This is the interface developers use to use the functionalities provided by the Pricing Module.
|
||||
|
||||
## Methods
|
||||
|
||||
- [addPrices](../IPricingModuleService/methods/IPricingModuleService.addPrices.md)
|
||||
- [addRules](../IPricingModuleService/methods/IPricingModuleService.addRules.md)
|
||||
- [calculatePrices](../IPricingModuleService/methods/IPricingModuleService.calculatePrices.md)
|
||||
- [create](../IPricingModuleService/methods/IPricingModuleService.create.md)
|
||||
- [createCurrencies](../IPricingModuleService/methods/IPricingModuleService.createCurrencies.md)
|
||||
- [createMoneyAmounts](../IPricingModuleService/methods/IPricingModuleService.createMoneyAmounts.md)
|
||||
- [createPriceRules](../IPricingModuleService/methods/IPricingModuleService.createPriceRules.md)
|
||||
- [createPriceSetMoneyAmountRules](../IPricingModuleService/methods/IPricingModuleService.createPriceSetMoneyAmountRules.md)
|
||||
- [createRuleTypes](../IPricingModuleService/methods/IPricingModuleService.createRuleTypes.md)
|
||||
- [delete](../IPricingModuleService/methods/IPricingModuleService.delete.md)
|
||||
- [deleteCurrencies](../IPricingModuleService/methods/IPricingModuleService.deleteCurrencies.md)
|
||||
- [deleteMoneyAmounts](../IPricingModuleService/methods/IPricingModuleService.deleteMoneyAmounts.md)
|
||||
- [deletePriceRules](../IPricingModuleService/methods/IPricingModuleService.deletePriceRules.md)
|
||||
- [deletePriceSetMoneyAmountRules](../IPricingModuleService/methods/IPricingModuleService.deletePriceSetMoneyAmountRules.md)
|
||||
- [deleteRuleTypes](../IPricingModuleService/methods/IPricingModuleService.deleteRuleTypes.md)
|
||||
- [list](../IPricingModuleService/methods/IPricingModuleService.list.md)
|
||||
- [listAndCount](../IPricingModuleService/methods/IPricingModuleService.listAndCount.md)
|
||||
- [listAndCountCurrencies](../IPricingModuleService/methods/IPricingModuleService.listAndCountCurrencies.md)
|
||||
- [listAndCountMoneyAmounts](../IPricingModuleService/methods/IPricingModuleService.listAndCountMoneyAmounts.md)
|
||||
- [listAndCountPriceRules](../IPricingModuleService/methods/IPricingModuleService.listAndCountPriceRules.md)
|
||||
- [listAndCountPriceSetMoneyAmountRules](../IPricingModuleService/methods/IPricingModuleService.listAndCountPriceSetMoneyAmountRules.md)
|
||||
- [listAndCountRuleTypes](../IPricingModuleService/methods/IPricingModuleService.listAndCountRuleTypes.md)
|
||||
- [listCurrencies](../IPricingModuleService/methods/IPricingModuleService.listCurrencies.md)
|
||||
- [listMoneyAmounts](../IPricingModuleService/methods/IPricingModuleService.listMoneyAmounts.md)
|
||||
- [listPriceRules](../IPricingModuleService/methods/IPricingModuleService.listPriceRules.md)
|
||||
- [listPriceSetMoneyAmountRules](../IPricingModuleService/methods/IPricingModuleService.listPriceSetMoneyAmountRules.md)
|
||||
- [listRuleTypes](../IPricingModuleService/methods/IPricingModuleService.listRuleTypes.md)
|
||||
- [removeRules](../IPricingModuleService/methods/IPricingModuleService.removeRules.md)
|
||||
- [retrieve](../IPricingModuleService/methods/IPricingModuleService.retrieve.md)
|
||||
- [retrieveCurrency](../IPricingModuleService/methods/IPricingModuleService.retrieveCurrency.md)
|
||||
- [retrieveMoneyAmount](../IPricingModuleService/methods/IPricingModuleService.retrieveMoneyAmount.md)
|
||||
- [retrievePriceRule](../IPricingModuleService/methods/IPricingModuleService.retrievePriceRule.md)
|
||||
- [retrievePriceSetMoneyAmountRules](../IPricingModuleService/methods/IPricingModuleService.retrievePriceSetMoneyAmountRules.md)
|
||||
- [retrieveRuleType](../IPricingModuleService/methods/IPricingModuleService.retrieveRuleType.md)
|
||||
- [updateCurrencies](../IPricingModuleService/methods/IPricingModuleService.updateCurrencies.md)
|
||||
- [updateMoneyAmounts](../IPricingModuleService/methods/IPricingModuleService.updateMoneyAmounts.md)
|
||||
- [updatePriceRules](../IPricingModuleService/methods/IPricingModuleService.updatePriceRules.md)
|
||||
- [updatePriceSetMoneyAmountRules](../IPricingModuleService/methods/IPricingModuleService.updatePriceSetMoneyAmountRules.md)
|
||||
- [updateRuleTypes](../IPricingModuleService/methods/IPricingModuleService.updateRuleTypes.md)
|
||||
@@ -0,0 +1,81 @@
|
||||
---
|
||||
displayed_sidebar: pricingReference
|
||||
---
|
||||
|
||||
# JoinerServiceConfig
|
||||
|
||||
## Properties
|
||||
|
||||
### alias
|
||||
|
||||
`Optional` **alias**: [`JoinerServiceConfigAlias`](JoinerServiceConfigAlias.md) \| [`JoinerServiceConfigAlias`](JoinerServiceConfigAlias.md)[]
|
||||
|
||||
Property name to use as entrypoint to the service
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/joiner/index.ts:38](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/joiner/index.ts#L38)
|
||||
|
||||
___
|
||||
|
||||
### args
|
||||
|
||||
`Optional` **args**: [`Record`](../types/Record.md)<`string`, `any`\>
|
||||
|
||||
Extra arguments to pass to the remoteFetchData callback
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/joiner/index.ts:59](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/joiner/index.ts#L59)
|
||||
|
||||
___
|
||||
|
||||
### extends
|
||||
|
||||
`Optional` **extends**: { `relationship`: [`JoinerRelationship`](../types/JoinerRelationship.md) ; `serviceName`: `string` }[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/joiner/index.ts:52](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/joiner/index.ts#L52)
|
||||
|
||||
___
|
||||
|
||||
### fieldAlias
|
||||
|
||||
`Optional` **fieldAlias**: [`Record`](../types/Record.md)<`string`, `string` \| { `forwardArgumentsOnPath`: `string`[] ; `path`: `string` }\>
|
||||
|
||||
alias for deeper nested relationships (e.g. { 'price': 'prices.calculated_price_set.amount' })
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/joiner/index.ts:42](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/joiner/index.ts#L42)
|
||||
|
||||
___
|
||||
|
||||
### primaryKeys
|
||||
|
||||
**primaryKeys**: `string`[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/joiner/index.ts:50](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/joiner/index.ts#L50)
|
||||
|
||||
___
|
||||
|
||||
### relationships
|
||||
|
||||
`Optional` **relationships**: [`JoinerRelationship`](../types/JoinerRelationship.md)[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/joiner/index.ts:51](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/joiner/index.ts#L51)
|
||||
|
||||
___
|
||||
|
||||
### serviceName
|
||||
|
||||
**serviceName**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/joiner/index.ts:34](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/joiner/index.ts#L34)
|
||||
@@ -0,0 +1,27 @@
|
||||
---
|
||||
displayed_sidebar: pricingReference
|
||||
---
|
||||
|
||||
# JoinerServiceConfigAlias
|
||||
|
||||
## Properties
|
||||
|
||||
### args
|
||||
|
||||
`Optional` **args**: [`Record`](../types/Record.md)<`string`, `any`\>
|
||||
|
||||
Extra arguments to pass to the remoteFetchData callback
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/joiner/index.ts:30](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/joiner/index.ts#L30)
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
**name**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/joiner/index.ts:26](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/joiner/index.ts#L26)
|
||||
@@ -0,0 +1,79 @@
|
||||
---
|
||||
displayed_sidebar: pricingReference
|
||||
---
|
||||
|
||||
# MoneyAmountDTO
|
||||
|
||||
An object that holds prices, which typically belong to a price set.
|
||||
|
||||
## Properties
|
||||
|
||||
### amount
|
||||
|
||||
`Optional` **amount**: `number`
|
||||
|
||||
A number indicating the amount of this price.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/money-amount.ts:20](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/money-amount.ts#L20)
|
||||
|
||||
___
|
||||
|
||||
### currency
|
||||
|
||||
`Optional` **currency**: [`CurrencyDTO`](CurrencyDTO.md)
|
||||
|
||||
An object of type [CurrencyDTO](CurrencyDTO.md) that holds the details of the price's currency. Since this is a relation, it will only be retrieved if it's passed to the `relations` array of the find-configuration options.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/money-amount.ts:19](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/money-amount.ts#L19)
|
||||
|
||||
___
|
||||
|
||||
### currency\_code
|
||||
|
||||
`Optional` **currency\_code**: `string`
|
||||
|
||||
A string that indicates the currency code of this price.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/money-amount.ts:18](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/money-amount.ts#L18)
|
||||
|
||||
___
|
||||
|
||||
### id
|
||||
|
||||
**id**: `string`
|
||||
|
||||
A string that indicates the ID of the money amount. A money amount represents a price.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/money-amount.ts:17](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/money-amount.ts#L17)
|
||||
|
||||
___
|
||||
|
||||
### max\_quantity
|
||||
|
||||
`Optional` **max\_quantity**: `number`
|
||||
|
||||
A number that indicates the maximum quantity required to be purchased for this price to be applied.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/money-amount.ts:22](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/money-amount.ts#L22)
|
||||
|
||||
___
|
||||
|
||||
### min\_quantity
|
||||
|
||||
`Optional` **min\_quantity**: `number`
|
||||
|
||||
A number that indicates the minimum quantity required to be purchased for this price to be applied.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/money-amount.ts:21](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/money-amount.ts#L21)
|
||||
@@ -0,0 +1,127 @@
|
||||
---
|
||||
displayed_sidebar: pricingReference
|
||||
---
|
||||
|
||||
# PriceRuleDTO
|
||||
|
||||
An object that represents a price rule.
|
||||
|
||||
## Properties
|
||||
|
||||
### id
|
||||
|
||||
**id**: `string`
|
||||
|
||||
A string indicating the ID of the price rule.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-rule.ts:22](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-rule.ts#L22)
|
||||
|
||||
___
|
||||
|
||||
### is\_dynamic
|
||||
|
||||
**is\_dynamic**: `boolean`
|
||||
|
||||
A boolean indicating whether the price rule is dynamic.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-rule.ts:27](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-rule.ts#L27)
|
||||
|
||||
___
|
||||
|
||||
### price\_list\_id
|
||||
|
||||
**price\_list\_id**: `string`
|
||||
|
||||
A string indicating the ID of the associated price list.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-rule.ts:31](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-rule.ts#L31)
|
||||
|
||||
___
|
||||
|
||||
### price\_set
|
||||
|
||||
**price\_set**: [`PriceSetDTO`](PriceSetDTO.md)
|
||||
|
||||
An object of type [PriceSetDTO](PriceSetDTO.md) that holds the data of the associated price set. It may only be available if the relation `price_set` is expanded.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-rule.ts:24](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-rule.ts#L24)
|
||||
|
||||
___
|
||||
|
||||
### price\_set\_id
|
||||
|
||||
**price\_set\_id**: `string`
|
||||
|
||||
A string indicating the ID of the associated price set.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-rule.ts:23](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-rule.ts#L23)
|
||||
|
||||
___
|
||||
|
||||
### price\_set\_money\_amount\_id
|
||||
|
||||
**price\_set\_money\_amount\_id**: `string`
|
||||
|
||||
A string indicating the ID of the associated price set money amount.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-rule.ts:30](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-rule.ts#L30)
|
||||
|
||||
___
|
||||
|
||||
### priority
|
||||
|
||||
**priority**: `number`
|
||||
|
||||
A number indicating the priority of the price rule in comparison to other applicable price rules.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-rule.ts:29](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-rule.ts#L29)
|
||||
|
||||
___
|
||||
|
||||
### rule\_type
|
||||
|
||||
**rule\_type**: [`RuleTypeDTO`](RuleTypeDTO.md)
|
||||
|
||||
An object of type [RuleTypeDTO](RuleTypeDTO.md) that holds the data of the associated rule type. It may only be available if the relation `rule_type` is expanded.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-rule.ts:26](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-rule.ts#L26)
|
||||
|
||||
___
|
||||
|
||||
### rule\_type\_id
|
||||
|
||||
**rule\_type\_id**: `string`
|
||||
|
||||
A string indicating the ID of the associated rule type.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-rule.ts:25](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-rule.ts#L25)
|
||||
|
||||
___
|
||||
|
||||
### value
|
||||
|
||||
**value**: `string`
|
||||
|
||||
A string indicating the value of the price rule.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-rule.ts:28](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-rule.ts#L28)
|
||||
@@ -0,0 +1,43 @@
|
||||
---
|
||||
displayed_sidebar: pricingReference
|
||||
---
|
||||
|
||||
# PriceSetDTO
|
||||
|
||||
An object that holds the details of a retrieved price set.
|
||||
|
||||
## Properties
|
||||
|
||||
### id
|
||||
|
||||
**id**: `string`
|
||||
|
||||
A string indicating the ID of the price set.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-set.ts:48](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-set.ts#L48)
|
||||
|
||||
___
|
||||
|
||||
### money\_amounts
|
||||
|
||||
`Optional` **money\_amounts**: [`MoneyAmountDTO`](MoneyAmountDTO.md)[]
|
||||
|
||||
An array of objects of type [MoneyAmountDTO](MoneyAmountDTO.md), which holds the prices that belong to this price set.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-set.ts:49](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-set.ts#L49)
|
||||
|
||||
___
|
||||
|
||||
### rule\_types
|
||||
|
||||
`Optional` **rule\_types**: [`RuleTypeDTO`](RuleTypeDTO.md)[]
|
||||
|
||||
An array of objects of type [RuleTypeDTO](RuleTypeDTO.md), which holds the rule types applied on this price set.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-set.ts:50](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-set.ts#L50)
|
||||
@@ -0,0 +1,55 @@
|
||||
---
|
||||
displayed_sidebar: pricingReference
|
||||
---
|
||||
|
||||
# PriceSetMoneyAmountDTO
|
||||
|
||||
An object representing a price set money amount, which holds the data related to the association between a price set and a money amount.
|
||||
|
||||
## Properties
|
||||
|
||||
### id
|
||||
|
||||
**id**: `string`
|
||||
|
||||
a string indicating the ID of a price set money amount.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-set-money-amount.ts:15](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-set-money-amount.ts#L15)
|
||||
|
||||
___
|
||||
|
||||
### money\_amount
|
||||
|
||||
`Optional` **money\_amount**: [`MoneyAmountDTO`](MoneyAmountDTO.md)
|
||||
|
||||
an object of type [MoneyAmountDTO](MoneyAmountDTO.md) holding the data of the associated money amount.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-set-money-amount.ts:18](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-set-money-amount.ts#L18)
|
||||
|
||||
___
|
||||
|
||||
### price\_set
|
||||
|
||||
`Optional` **price\_set**: [`PriceSetDTO`](PriceSetDTO.md)
|
||||
|
||||
an object of type [PriceSetDTO](PriceSetDTO.md) holding the data of the associated price set.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-set-money-amount.ts:17](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-set-money-amount.ts#L17)
|
||||
|
||||
___
|
||||
|
||||
### title
|
||||
|
||||
`Optional` **title**: `string`
|
||||
|
||||
a string indicating the title of the price set money amount.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-set-money-amount.ts:16](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-set-money-amount.ts#L16)
|
||||
@@ -0,0 +1,55 @@
|
||||
---
|
||||
displayed_sidebar: pricingReference
|
||||
---
|
||||
|
||||
# PriceSetMoneyAmountRulesDTO
|
||||
|
||||
An object representing a price set money amount rule, which holds data related to the association between a price set money amount and a rule.
|
||||
|
||||
## Properties
|
||||
|
||||
### id
|
||||
|
||||
**id**: `string`
|
||||
|
||||
A string indicating the ID of the price set money amount.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-set-money-amount-rules.ts:16](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-set-money-amount-rules.ts#L16)
|
||||
|
||||
___
|
||||
|
||||
### price\_set\_money\_amount
|
||||
|
||||
**price\_set\_money\_amount**: [`PriceSetMoneyAmountDTO`](PriceSetMoneyAmountDTO.md)
|
||||
|
||||
an object of type [PriceSetMoneyAmountDTO](PriceSetMoneyAmountDTO.md) holding the data of the associated price set money amount.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-set-money-amount-rules.ts:17](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-set-money-amount-rules.ts#L17)
|
||||
|
||||
___
|
||||
|
||||
### rule\_type
|
||||
|
||||
**rule\_type**: [`RuleTypeDTO`](RuleTypeDTO.md)
|
||||
|
||||
an object of type [RuleTypeDTO](RuleTypeDTO.md) holding the data of the associated rule type.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-set-money-amount-rules.ts:18](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-set-money-amount-rules.ts#L18)
|
||||
|
||||
___
|
||||
|
||||
### value
|
||||
|
||||
**value**: `string`
|
||||
|
||||
a string indicating the value of the price set money amount rule.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-set-money-amount-rules.ts:19](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-set-money-amount-rules.ts#L19)
|
||||
@@ -0,0 +1,26 @@
|
||||
---
|
||||
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**
|
||||
|
||||
```ts
|
||||
To calculate prices
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
### context
|
||||
|
||||
`Optional` **context**: [`Record`](../types/Record.md)<`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](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-set.ts#L23)
|
||||
@@ -0,0 +1,19 @@
|
||||
---
|
||||
displayed_sidebar: pricingReference
|
||||
---
|
||||
|
||||
# PricingFilters
|
||||
|
||||
Used to filter prices when calculating them.
|
||||
|
||||
## Properties
|
||||
|
||||
### id
|
||||
|
||||
**id**: `string`[]
|
||||
|
||||
An array of strings, each being an ID of a price set.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-set.ts:34](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-set.ts#L34)
|
||||
@@ -0,0 +1,31 @@
|
||||
---
|
||||
displayed_sidebar: pricingReference
|
||||
---
|
||||
|
||||
# RemovePriceSetRulesDTO
|
||||
|
||||
An object of expected properties when removing a price set's rules.
|
||||
|
||||
## Properties
|
||||
|
||||
### id
|
||||
|
||||
**id**: `string`
|
||||
|
||||
A string indicating the ID of the price set.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-set.ts:118](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-set.ts#L118)
|
||||
|
||||
___
|
||||
|
||||
### rules
|
||||
|
||||
**rules**: `string`[]
|
||||
|
||||
An array of strings, each string is the `rule_attribute` of a rule you want to remove.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-set.ts:119](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-set.ts#L119)
|
||||
@@ -0,0 +1,55 @@
|
||||
---
|
||||
displayed_sidebar: pricingReference
|
||||
---
|
||||
|
||||
# RuleTypeDTO
|
||||
|
||||
An object that holds the details of a rule type.
|
||||
|
||||
## Properties
|
||||
|
||||
### default\_priority
|
||||
|
||||
**default\_priority**: `number`
|
||||
|
||||
A number indicating the priority of the rule type. This is useful when calculating the price of a price set, and multiple rules satisfy the provided context. The higher the value, the higher the priority of the rule type.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/rule-type.ts:17](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/rule-type.ts#L17)
|
||||
|
||||
___
|
||||
|
||||
### id
|
||||
|
||||
**id**: `string`
|
||||
|
||||
A string indicating the ID of the rule type.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/rule-type.ts:14](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/rule-type.ts#L14)
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
**name**: `string`
|
||||
|
||||
A string indicating the display name of the rule type.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/rule-type.ts:15](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/rule-type.ts#L15)
|
||||
|
||||
___
|
||||
|
||||
### rule\_attribute
|
||||
|
||||
**rule\_attribute**: `string`
|
||||
|
||||
A string indicating a unique name used to later identify the rule_attribute. For example, it can be used in the `context` parameter of the `calculatePrices` method to specify a rule for calculating the price.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/rule-type.ts:16](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/rule-type.ts#L16)
|
||||
@@ -0,0 +1,56 @@
|
||||
---
|
||||
displayed_sidebar: pricingReference
|
||||
---
|
||||
|
||||
# UpdateCurrencyDTO
|
||||
|
||||
An object that holds data to update a currency. The currency code must be provided to identify which currency to update.
|
||||
|
||||
## Properties
|
||||
|
||||
### code
|
||||
|
||||
**code**: `string`
|
||||
|
||||
a string indicating the code of the currency to update.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/currency.ts:54](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/currency.ts#L54)
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
`Optional` **name**: `string`
|
||||
|
||||
a string indicating the name of the currency.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/currency.ts:57](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/currency.ts#L57)
|
||||
|
||||
___
|
||||
|
||||
### symbol
|
||||
|
||||
`Optional` **symbol**: `string`
|
||||
|
||||
a string indicating the symbol of the currency.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/currency.ts:55](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/currency.ts#L55)
|
||||
|
||||
___
|
||||
|
||||
### symbol\_native
|
||||
|
||||
`Optional` **symbol\_native**: `string`
|
||||
|
||||
a string indicating the symbol of the currecy in its native form.
|
||||
This is typically the symbol used when displaying a price.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/currency.ts:56](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/currency.ts#L56)
|
||||
@@ -0,0 +1,69 @@
|
||||
---
|
||||
displayed_sidebar: pricingReference
|
||||
---
|
||||
|
||||
# UpdateMoneyAmountDTO
|
||||
|
||||
*
|
||||
|
||||
An object that holds data to update a money amount.
|
||||
|
||||
## Properties
|
||||
|
||||
### amount
|
||||
|
||||
`Optional` **amount**: `number`
|
||||
|
||||
A number indicating the amount of this money amount.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/money-amount.ts:61](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/money-amount.ts#L61)
|
||||
|
||||
___
|
||||
|
||||
### currency\_code
|
||||
|
||||
`Optional` **currency\_code**: `string`
|
||||
|
||||
A string that indicates the currency code of the money amount.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/money-amount.ts:60](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/money-amount.ts#L60)
|
||||
|
||||
___
|
||||
|
||||
### id
|
||||
|
||||
**id**: `string`
|
||||
|
||||
A string that indicates the ID of the money amount to update.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/money-amount.ts:59](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/money-amount.ts#L59)
|
||||
|
||||
___
|
||||
|
||||
### max\_quantity
|
||||
|
||||
`Optional` **max\_quantity**: `number`
|
||||
|
||||
A number that indicates the maximum quantity required to be purchased for this money amount to be applied.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/money-amount.ts:63](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/money-amount.ts#L63)
|
||||
|
||||
___
|
||||
|
||||
### min\_quantity
|
||||
|
||||
`Optional` **min\_quantity**: `number`
|
||||
|
||||
A number that indicates the minimum quantity required to be purchased for this money amount to be applied.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/money-amount.ts:62](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/money-amount.ts#L62)
|
||||
@@ -0,0 +1,91 @@
|
||||
---
|
||||
displayed_sidebar: pricingReference
|
||||
---
|
||||
|
||||
# UpdatePriceRuleDTO
|
||||
|
||||
An object used to specify the necessary data to update a price rule.
|
||||
|
||||
## Properties
|
||||
|
||||
### id
|
||||
|
||||
**id**: `string`
|
||||
|
||||
A string indicating the ID of the price rule to update.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-rule.ts:75](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-rule.ts#L75)
|
||||
|
||||
___
|
||||
|
||||
### price\_list\_id
|
||||
|
||||
`Optional` **price\_list\_id**: `string`
|
||||
|
||||
A string indicating the ID of the associated price list.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-rule.ts:88](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-rule.ts#L88)
|
||||
|
||||
___
|
||||
|
||||
### price\_set\_id
|
||||
|
||||
`Optional` **price\_set\_id**: `string`
|
||||
|
||||
A string indicating the ID of the associated price set.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-rule.ts:76](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-rule.ts#L76)
|
||||
|
||||
___
|
||||
|
||||
### price\_set\_money\_amount\_id
|
||||
|
||||
`Optional` **price\_set\_money\_amount\_id**: `string`
|
||||
|
||||
A string indicating the ID of the associated price set money amount.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-rule.ts:87](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-rule.ts#L87)
|
||||
|
||||
___
|
||||
|
||||
### priority
|
||||
|
||||
`Optional` **priority**: `number`
|
||||
|
||||
A number indicating the priority of the price rule in comparison to other applicable price rules.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-rule.ts:86](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-rule.ts#L86)
|
||||
|
||||
___
|
||||
|
||||
### rule\_type\_id
|
||||
|
||||
`Optional` **rule\_type\_id**: `string`
|
||||
|
||||
A string indicating the ID of the associated rule type.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-rule.ts:77](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-rule.ts#L77)
|
||||
|
||||
___
|
||||
|
||||
### value
|
||||
|
||||
`Optional` **value**: `string`
|
||||
|
||||
A string indicating the value of the price rule.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-rule.ts:85](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-rule.ts#L85)
|
||||
@@ -0,0 +1,19 @@
|
||||
---
|
||||
displayed_sidebar: pricingReference
|
||||
---
|
||||
|
||||
# UpdatePriceSetDTO
|
||||
|
||||
An object of expected properties when updating a price set.
|
||||
|
||||
## Properties
|
||||
|
||||
### id
|
||||
|
||||
**id**: `string`
|
||||
|
||||
A string indicating the ID of the price set to update.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-set.ts:145](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-set.ts#L145)
|
||||
@@ -0,0 +1,55 @@
|
||||
---
|
||||
displayed_sidebar: pricingReference
|
||||
---
|
||||
|
||||
# UpdatePriceSetMoneyAmountRulesDTO
|
||||
|
||||
An object used to update a price set money amount rule. The price set money amount rule is identified by the provided `id`.
|
||||
|
||||
## Properties
|
||||
|
||||
### id
|
||||
|
||||
**id**: `string`
|
||||
|
||||
A string indicating the ID of the price set money amount rule to update.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-set-money-amount-rules.ts:48](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-set-money-amount-rules.ts#L48)
|
||||
|
||||
___
|
||||
|
||||
### price\_set\_money\_amount
|
||||
|
||||
`Optional` **price\_set\_money\_amount**: `string`
|
||||
|
||||
A string indicating the ID of a price set money amount.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-set-money-amount-rules.ts:49](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-set-money-amount-rules.ts#L49)
|
||||
|
||||
___
|
||||
|
||||
### rule\_type
|
||||
|
||||
`Optional` **rule\_type**: `string`
|
||||
|
||||
A string indicating the ID of a rule type.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-set-money-amount-rules.ts:50](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-set-money-amount-rules.ts#L50)
|
||||
|
||||
___
|
||||
|
||||
### value
|
||||
|
||||
`Optional` **value**: `string`
|
||||
|
||||
A string indicating the value of the price set money amount rule.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/price-set-money-amount-rules.ts:51](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/price-set-money-amount-rules.ts#L51)
|
||||
@@ -0,0 +1,55 @@
|
||||
---
|
||||
displayed_sidebar: pricingReference
|
||||
---
|
||||
|
||||
# UpdateRuleTypeDTO
|
||||
|
||||
An object used when updating a rule type to specify the data to update.
|
||||
|
||||
## Properties
|
||||
|
||||
### default\_priority
|
||||
|
||||
`Optional` **default\_priority**: `number`
|
||||
|
||||
A number indicating the priority of the rule type. This is useful when calculating the price of a price set, and multiple rules satisfy the provided context. The higher the value, the higher the priority of the rule type.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/rule-type.ts:51](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/rule-type.ts#L51)
|
||||
|
||||
___
|
||||
|
||||
### id
|
||||
|
||||
**id**: `string`
|
||||
|
||||
A string indicating the ID of the rule type to update.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/rule-type.ts:48](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/rule-type.ts#L48)
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
`Optional` **name**: `string`
|
||||
|
||||
A string indicating the display name of the rule type.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/rule-type.ts:49](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/rule-type.ts#L49)
|
||||
|
||||
___
|
||||
|
||||
### rule\_attribute
|
||||
|
||||
`Optional` **rule\_attribute**: `string`
|
||||
|
||||
A string indicating a unique name used to later identify the rule_attribute. For example, it can be used in the `context` parameter of the `calculatePrices` method to specify a rule for calculating the price.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[packages/types/src/pricing/common/rule-type.ts:50](https://github.com/medusajs/medusa/blob/daea35fe73/packages/types/src/pricing/common/rule-type.ts#L50)
|
||||
Reference in New Issue
Block a user