chore: reorganize docs apps (#7228)

* reorganize docs apps

* add README

* fix directory

* add condition for old docs
This commit is contained in:
Shahed Nasser authored and GitHub committed 2024-05-03 17:36:38 +03:00
1 parent 224ebb2154
commit 4fe28f5a95
6187 files changed
+601447 -598226

No files matched your search

@@ -0,0 +1,11 @@
---
displayed_sidebar: pricingReference
---
import { TypeList } from "docs-ui"
# clearMessages
## Returns
<TypeList types={[{"name":"void","type":"`void`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="clearMessages"/>
@@ -0,0 +1,15 @@
---
displayed_sidebar: pricingReference
---
import { TypeList } from "docs-ui"
# getMessages
## Parameters
<TypeList types={[{"name":"format","type":"[MessageAggregatorFormat](../../../interfaces/pricing.MessageAggregatorFormat/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"groupBy","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sortBy","type":"`object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="getMessages"/>
## Returns
<TypeList types={[{"name":"Record","type":"`Record<string, [Message](../../../types/pricing.Message/page.mdx)[]>`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]},{"name":"Message[]","type":"[Message](../../../types/pricing.Message/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"Message","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="getMessages"/>
@@ -0,0 +1,15 @@
---
displayed_sidebar: pricingReference
---
import { TypeList } from "docs-ui"
# save
## Parameters
<TypeList types={[{"name":"msg","type":"[Message](../../../types/pricing.Message/page.mdx) \\| [Message](../../../types/pricing.Message/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="save"/>
## Returns
<TypeList types={[{"name":"void","type":"`void`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="save"/>
@@ -0,0 +1,15 @@
---
displayed_sidebar: pricingReference
---
import { TypeList } from "docs-ui"
# saveRawMessageData
## Parameters
<TypeList types={[{"name":"messageData","type":"[MessageFormat](../../../types/pricing.MessageFormat/page.mdx)&#60;T&#62; \\| [MessageFormat](../../../types/pricing.MessageFormat/page.mdx)&#60;T&#62;[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="saveRawMessageData"/>
## Returns
<TypeList types={[{"name":"void","type":"`void`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="saveRawMessageData"/>
@@ -0,0 +1,39 @@
---
displayed_sidebar: pricingReference
slug: /references/pricing/addPriceListPrices
sidebar_label: addPriceListPrices
---
import { TypeList } from "docs-ui"
# addPriceListPrices - Pricing Module Reference
This documentation provides a reference to the `addPriceListPrices` method. This belongs to the Pricing Module.
This method is used to add prices to price lists.
## Example
```ts
const priceLists =
await pricingModuleService.addPriceListPrices([
{
price_list_id: "plist_123",
prices: [
{
currency_code: "usd",
amount: 500,
price_set_id: "pset_123",
},
],
},
])
```
## Parameters
<TypeList types={[{"name":"data","type":"[AddPriceListPricesDTO](../../../interfaces/pricing.AddPriceListPricesDTO/page.mdx)[]","description":"The prices to add for each price list.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"price_list_id","type":"`string`","description":"The ID of the price list to add prices to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"[CreatePriceListPriceDTO](../../../interfaces/pricing.CreatePriceListPriceDTO/page.mdx)[]","description":"The prices to add.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"currency_code","type":"`string`","description":"The currency code of this money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../../types/pricing.BigNumberInput/page.mdx)","description":"The amount of this money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_set_id","type":"`string`","description":"The ID of the associated price set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the money amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"`null` \\| [BigNumberInput](../../../types/pricing.BigNumberInput/page.mdx)","description":"The minimum quantity required to be purchased for this money amount to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"`null` \\| [BigNumberInput](../../../types/pricing.BigNumberInput/page.mdx)","description":"The maximum quantity required to be purchased for this money amount to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[CreatePriceSetPriceRules](../../../interfaces/pricing.CreatePriceSetPriceRules/page.mdx)","description":"The rules to add to the price. The object's keys are rule types' `rule_attribute` attribute, and values are the value of that rule associated with this price.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/pricing.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/pricing.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="addPriceListPrices"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PriceDTO](../../../interfaces/pricing.PriceDTO/page.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The updated price lists.","expandable":false,"children":[{"name":"PriceDTO[]","type":"[PriceDTO](../../../interfaces/pricing.PriceDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"PriceDTO","type":"`object`","description":"A price's data.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="addPriceListPrices"/>
@@ -0,0 +1,119 @@
---
displayed_sidebar: pricingReference
slug: /references/pricing/addPrices
sidebar_label: addPrices
---
import { TypeList } from "docs-ui"
# addPrices - Pricing Module Reference
This documentation provides a reference to the `addPrices` method. This belongs to the Pricing Module.
## addPrices(data, sharedContext?): Promise&#60;[PriceSetDTO](../../../interfaces/pricing.PriceSetDTO/page.mdx)&#62;
This method adds prices to a price set.
### Example
To add a default price to a price set, don't pass it any rules and make sure to pass it the `currency_code`:
```ts
const priceSet = await pricingModuleService.addPrices({
priceSetId: "pset_123",
prices: [
{
amount: 500,
currency_code: "USD",
rules: {},
},
],
})
```
To add prices with rules:
```ts
const priceSet = await pricingModuleService.addPrices({
priceSetId: "pset_123",
prices: [
{
amount: 300,
currency_code: "EUR",
rules: {
region_id: "PL",
city: "krakow",
},
},
{
amount: 400,
currency_code: "EUR",
min_quantity: 0,
max_quantity: 4,
rules: {
region_id: "PL",
},
},
{
amount: 450,
currency_code: "EUR",
rules: {
city: "krakow",
},
},
],
})
```
### Parameters
<TypeList types={[{"name":"data","type":"[AddPricesDTO](../../../interfaces/pricing.AddPricesDTO/page.mdx)","description":"The data defining the price set to add the prices to, along with the prices to add.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"priceSetId","type":"`string`","description":"The ID of the price set to add prices to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"[CreatePricesDTO](../../../interfaces/pricing.CreatePricesDTO/page.mdx)[]","description":"The prices to add to the price set.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"currency_code","type":"`string`","description":"The currency code of this money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../../types/pricing.BigNumberInput/page.mdx)","description":"The amount of this money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the money amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"`null` \\| [BigNumberInput](../../../types/pricing.BigNumberInput/page.mdx)","description":"The minimum quantity required to be purchased for this money amount to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"`null` \\| [BigNumberInput](../../../types/pricing.BigNumberInput/page.mdx)","description":"The maximum quantity required to be purchased for this money amount to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[CreatePriceSetPriceRules](../../../interfaces/pricing.CreatePriceSetPriceRules/page.mdx)","description":"The rules to add to the price. The object's keys are rule types' `rule_attribute` attribute, and values are the value of that rule associated with this price.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/pricing.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/pricing.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="addPrices"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PriceSetDTO](../../../interfaces/pricing.PriceSetDTO/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The price set that the prices were added to.","expandable":false,"children":[{"name":"PriceSetDTO","type":"[PriceSetDTO](../../../interfaces/pricing.PriceSetDTO/page.mdx)","optional":false,"defaultValue":"","description":"A price set's data.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the price set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"[MoneyAmountDTO](../../../interfaces/pricing.MoneyAmountDTO/page.mdx)[]","description":"The prices that belong to this price set.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"When the money\\_amount was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"When the money\\_amount was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"When the money\\_amount was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency code of this money amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../../types/pricing.BigNumberValue/page.mdx)","description":"The price of this money amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"[BigNumberValue](../../../types/pricing.BigNumberValue/page.mdx)","description":"The minimum quantity required to be purchased for this price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"[BigNumberValue](../../../types/pricing.BigNumberValue/page.mdx)","description":"The maximum quantity required to be purchased for this price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"rule_types","type":"[RuleTypeDTO](../../../interfaces/pricing.RuleTypeDTO/page.mdx)[]","description":"The rule types applied on this price set.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the rule type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The display name of the rule type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rule_attribute","type":"`string`","description":"The unique name used to later identify the rule\\_attribute. For example, it can be used in the `context` parameter of\nthe `calculatePrices` method to specify a rule for calculating the price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_priority","type":"`number`","description":"The priority of the rule type. This is useful when calculating the price of a price set, and multiple rules satisfy\nthe provided context. The higher the value, the higher the priority of the rule type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the rule type.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the rule type.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]}]} sectionTitle="addPrices"/>
## addPrices(data, sharedContext?): Promise&#60;[PriceSetDTO](../../../interfaces/pricing.PriceSetDTO/page.mdx)[]&#62;
This method adds prices to multiple price sets.
### Example
```ts
const priceSets = await pricingModuleService.addPrices([
{
priceSetId: "pset_123",
prices: [
// default price because it doesn't
// have rules
{
amount: 500,
currency_code: "USD",
rules: {},
},
],
},
{
priceSetId: "pset_321",
prices: [
// prices with rules
{
amount: 300,
currency_code: "EUR",
rules: {
region_id: "PL",
city: "krakow",
},
},
],
},
])
```
### Parameters
<TypeList types={[{"name":"data","type":"[AddPricesDTO](../../../interfaces/pricing.AddPricesDTO/page.mdx)[]","description":"The data defining the prices to add per price set.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"priceSetId","type":"`string`","description":"The ID of the price set to add prices to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"[CreatePricesDTO](../../../interfaces/pricing.CreatePricesDTO/page.mdx)[]","description":"The prices to add to the price set.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"currency_code","type":"`string`","description":"The currency code of this money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../../types/pricing.BigNumberInput/page.mdx)","description":"The amount of this money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the money amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"`null` \\| [BigNumberInput](../../../types/pricing.BigNumberInput/page.mdx)","description":"The minimum quantity required to be purchased for this money amount to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"`null` \\| [BigNumberInput](../../../types/pricing.BigNumberInput/page.mdx)","description":"The maximum quantity required to be purchased for this money amount to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[CreatePriceSetPriceRules](../../../interfaces/pricing.CreatePriceSetPriceRules/page.mdx)","description":"The rules to add to the price. The object's keys are rule types' `rule_attribute` attribute, and values are the value of that rule associated with this price.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/pricing.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/pricing.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="addPrices"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PriceSetDTO](../../../interfaces/pricing.PriceSetDTO/page.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The list of the price sets that prices were added to.","expandable":false,"children":[{"name":"PriceSetDTO[]","type":"[PriceSetDTO](../../../interfaces/pricing.PriceSetDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"PriceSetDTO","type":"`object`","description":"A price set's data.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="addPrices"/>
@@ -0,0 +1,71 @@
---
displayed_sidebar: pricingReference
slug: /references/pricing/addRules
sidebar_label: addRules
---
import { TypeList } from "docs-ui"
# addRules - Pricing Module Reference
This documentation provides a reference to the `addRules` method. This belongs to the Pricing Module.
## addRules(data, sharedContext?): Promise&#60;[PriceSetDTO](../../../interfaces/pricing.PriceSetDTO/page.mdx)&#62;
This method adds rules to a price set.
### Example
```ts
const priceSet = await pricingModuleService.addRules({
priceSetId: "pset_123",
rules: [
{
attribute: "region_id",
},
],
})
```
### Parameters
<TypeList types={[{"name":"data","type":"[AddRulesDTO](../../../interfaces/pricing.AddRulesDTO/page.mdx)","description":"The data defining the price set to add the rules to, along with the rules to add.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"priceSetId","type":"`string`","description":"The ID of the price set to add the rules to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"`object`[]","description":"The rules to add to a price set.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"attribute","type":"`string`","description":"The value of the rule's `rule_attribute` attribute.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/pricing.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/pricing.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="addRules"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PriceSetDTO](../../../interfaces/pricing.PriceSetDTO/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The price set that the rules were added to.","expandable":false,"children":[{"name":"PriceSetDTO","type":"[PriceSetDTO](../../../interfaces/pricing.PriceSetDTO/page.mdx)","optional":false,"defaultValue":"","description":"A price set's data.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the price set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"[MoneyAmountDTO](../../../interfaces/pricing.MoneyAmountDTO/page.mdx)[]","description":"The prices that belong to this price set.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"When the money\\_amount was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"When the money\\_amount was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"When the money\\_amount was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency code of this money amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../../types/pricing.BigNumberValue/page.mdx)","description":"The price of this money amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"[BigNumberValue](../../../types/pricing.BigNumberValue/page.mdx)","description":"The minimum quantity required to be purchased for this price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"[BigNumberValue](../../../types/pricing.BigNumberValue/page.mdx)","description":"The maximum quantity required to be purchased for this price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"rule_types","type":"[RuleTypeDTO](../../../interfaces/pricing.RuleTypeDTO/page.mdx)[]","description":"The rule types applied on this price set.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the rule type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The display name of the rule type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rule_attribute","type":"`string`","description":"The unique name used to later identify the rule\\_attribute. For example, it can be used in the `context` parameter of\nthe `calculatePrices` method to specify a rule for calculating the price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_priority","type":"`number`","description":"The priority of the rule type. This is useful when calculating the price of a price set, and multiple rules satisfy\nthe provided context. The higher the value, the higher the priority of the rule type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the rule type.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the rule type.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]}]} sectionTitle="addRules"/>
## addRules(data, sharedContext?): Promise&#60;[PriceSetDTO](../../../interfaces/pricing.PriceSetDTO/page.mdx)[]&#62;
This method adds rules to multiple price sets.
### Example
```ts
const priceSets = await pricingModuleService.addRules([
{
priceSetId: "pset_123",
rules: [
{
attribute: "region_id",
},
],
},
{
priceSetId: "pset_321",
rules: [
{
attribute: "customer_group_id",
},
],
},
])
```
### Parameters
<TypeList types={[{"name":"data","type":"[AddRulesDTO](../../../interfaces/pricing.AddRulesDTO/page.mdx)[]","description":"The data defining the rules to add per price set.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"priceSetId","type":"`string`","description":"The ID of the price set to add the rules to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"`object`[]","description":"The rules to add to a price set.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"attribute","type":"`string`","description":"The value of the rule's `rule_attribute` attribute.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/pricing.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/pricing.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="addRules"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PriceSetDTO](../../../interfaces/pricing.PriceSetDTO/page.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The list of the price sets that the rules were added to.","expandable":false,"children":[{"name":"PriceSetDTO[]","type":"[PriceSetDTO](../../../interfaces/pricing.PriceSetDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"PriceSetDTO","type":"`object`","description":"A price set's data.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="addRules"/>
@@ -0,0 +1,70 @@
---
displayed_sidebar: pricingReference
slug: /references/pricing/calculatePrices
sidebar_label: calculatePrices
---
import { TypeList } from "docs-ui"
# calculatePrices - Pricing Module Reference
This documentation provides a reference to the `calculatePrices` method. This belongs to the Pricing Module.
This method is used to calculate prices based on the provided filters and context.
## Example
When you calculate prices, you must at least specify the currency code:
```ts
const price = await pricingModuleService.calculatePrices(
{
id: ["pset_123", "pset_321"],
},
{
context: {
currency_code: "usd",
},
}
)
```
To calculate prices for specific minimum and/or maximum quantity:
```ts
const price = await pricingModuleService.calculatePrices(
{
id: ["pset_123", "pset_321"],
},
{
context: {
currency_code: "usd",
min_quantity: 4,
},
}
)
```
To calculate prices for custom rule types:
```ts
const price = await pricingModuleService.calculatePrices(
{
id: ["pset_123", "pset_321"],
},
{
context: {
currency_code: "usd",
region_id: "US",
},
}
)
```
## Parameters
<TypeList types={[{"name":"filters","type":"[PricingFilters](../../../interfaces/pricing.PricingFilters/page.mdx)","description":"The filters to apply on prices.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`[]","description":"IDs of the price sets to use in the\ncalculation.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"context","type":"[PricingContext](../../../interfaces/pricing.PricingContext/page.mdx)","description":"The context used to select the prices. For example, you can specify the region ID in this context, and only prices having the same value\nwill be retrieved.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"context","type":"`Record<string, [BigNumberInput](../../../types/pricing.BigNumberInput/page.mdx)>`","description":"an object whose keys are the name of the context attribute. Its value can be a string or a BigNumberInput. For example, you can pass the `currency_code` property with its value being the currency code to calculate the price in.\nAnother 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.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/pricing.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/pricing.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="calculatePrices"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[CalculatedPriceSet](../../../interfaces/pricing.CalculatedPriceSet/page.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The calculated prices matching the context and filters provided.","expandable":false,"children":[{"name":"CalculatedPriceSet[]","type":"[CalculatedPriceSet](../../../interfaces/pricing.CalculatedPriceSet/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CalculatedPriceSet","type":"`object`","description":"The calculated price for a specific price set and context.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="calculatePrices"/>
@@ -0,0 +1,154 @@
---
displayed_sidebar: pricingReference
slug: /references/pricing/create
sidebar_label: create
---
import { TypeList } from "docs-ui"
# create - Pricing Module Reference
This documentation provides a reference to the `create` method. This belongs to the Pricing Module.
## create(data, sharedContext?): Promise&#60;[PriceSetDTO](../../../interfaces/pricing.PriceSetDTO/page.mdx)&#62;
This method is used to create a new price set.
### Example
To create a default price set, don't pass any rules. For example:
```ts
const priceSet = await pricingModuleService.create({
rules: [],
prices: [
{
amount: 500,
currency_code: "USD",
min_quantity: 0,
max_quantity: 4,
rules: {},
},
{
amount: 400,
currency_code: "USD",
min_quantity: 5,
max_quantity: 10,
rules: {},
},
],
})
```
To create a price set and associate it with rule types:
```ts
const priceSet = await pricingModuleService.create({
rules: [
{ rule_attribute: "region_id" },
{ rule_attribute: "city" },
],
prices: [
{
amount: 300,
currency_code: "EUR",
rules: {
region_id: "PL",
city: "krakow",
},
},
{
amount: 400,
currency_code: "EUR",
rules: {
region_id: "PL",
},
},
{
amount: 450,
currency_code: "EUR",
rules: {
city: "krakow",
},
},
],
})
```
### Parameters
<TypeList types={[{"name":"data","type":"[CreatePriceSetDTO](../../../interfaces/pricing.CreatePriceSetDTO/page.mdx)","description":"The attributes of the price set to create.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"rules","type":"`object`[]","description":"The rules to associate with the price set.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"rule_attribute","type":"`string`","description":"the value of the rule's `rule_attribute` attribute.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"prices","type":"[CreatePricesDTO](../../../interfaces/pricing.CreatePricesDTO/page.mdx)[]","description":"The prices to create and add to this price set.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"currency_code","type":"`string`","description":"The currency code of this money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../../types/pricing.BigNumberInput/page.mdx)","description":"The amount of this money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the money amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"`null` \\| [BigNumberInput](../../../types/pricing.BigNumberInput/page.mdx)","description":"The minimum quantity required to be purchased for this money amount to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"`null` \\| [BigNumberInput](../../../types/pricing.BigNumberInput/page.mdx)","description":"The maximum quantity required to be purchased for this money amount to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[CreatePriceSetPriceRules](../../../interfaces/pricing.CreatePriceSetPriceRules/page.mdx)","description":"The rules to add to the price. The object's keys are rule types' `rule_attribute` attribute, and values are the value of that rule associated with this price.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/pricing.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/pricing.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="create"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PriceSetDTO](../../../interfaces/pricing.PriceSetDTO/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The created price set.","expandable":false,"children":[{"name":"PriceSetDTO","type":"[PriceSetDTO](../../../interfaces/pricing.PriceSetDTO/page.mdx)","optional":false,"defaultValue":"","description":"A price set's data.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the price set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"[MoneyAmountDTO](../../../interfaces/pricing.MoneyAmountDTO/page.mdx)[]","description":"The prices that belong to this price set.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"When the money\\_amount was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"When the money\\_amount was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"When the money\\_amount was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency code of this money amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../../types/pricing.BigNumberValue/page.mdx)","description":"The price of this money amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"[BigNumberValue](../../../types/pricing.BigNumberValue/page.mdx)","description":"The minimum quantity required to be purchased for this price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"[BigNumberValue](../../../types/pricing.BigNumberValue/page.mdx)","description":"The maximum quantity required to be purchased for this price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"rule_types","type":"[RuleTypeDTO](../../../interfaces/pricing.RuleTypeDTO/page.mdx)[]","description":"The rule types applied on this price set.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the rule type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The display name of the rule type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rule_attribute","type":"`string`","description":"The unique name used to later identify the rule\\_attribute. For example, it can be used in the `context` parameter of\nthe `calculatePrices` method to specify a rule for calculating the price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_priority","type":"`number`","description":"The priority of the rule type. This is useful when calculating the price of a price set, and multiple rules satisfy\nthe provided context. The higher the value, the higher the priority of the rule type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the rule type.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the rule type.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]}]} sectionTitle="create"/>
## create(data, sharedContext?): Promise&#60;[PriceSetDTO](../../../interfaces/pricing.PriceSetDTO/page.mdx)[]&#62;
This method is used to create multiple price sets.
### Example
```ts
const priceSets = await pricingModuleService.create([
// default price set
{
rules: [],
prices: [
{
amount: 500,
currency_code: "USD",
min_quantity: 0,
max_quantity: 4,
rules: {},
},
{
amount: 400,
currency_code: "USD",
min_quantity: 5,
max_quantity: 10,
rules: {},
},
],
},
// price set with rules
{
rules: [
{ rule_attribute: "region_id" },
{ rule_attribute: "city" },
],
prices: [
{
amount: 300,
currency_code: "EUR",
rules: {
region_id: "PL",
city: "krakow",
},
},
{
amount: 400,
currency_code: "EUR",
rules: {
region_id: "PL",
},
},
{
amount: 450,
currency_code: "EUR",
rules: {
city: "krakow",
},
},
],
},
])
```
### Parameters
<TypeList types={[{"name":"data","type":"[CreatePriceSetDTO](../../../interfaces/pricing.CreatePriceSetDTO/page.mdx)[]","description":"The price sets to create.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"rules","type":"`object`[]","description":"The rules to associate with the price set.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"rule_attribute","type":"`string`","description":"the value of the rule's `rule_attribute` attribute.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"prices","type":"[CreatePricesDTO](../../../interfaces/pricing.CreatePricesDTO/page.mdx)[]","description":"The prices to create and add to this price set.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"currency_code","type":"`string`","description":"The currency code of this money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../../types/pricing.BigNumberInput/page.mdx)","description":"The amount of this money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the money amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"`null` \\| [BigNumberInput](../../../types/pricing.BigNumberInput/page.mdx)","description":"The minimum quantity required to be purchased for this money amount to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"`null` \\| [BigNumberInput](../../../types/pricing.BigNumberInput/page.mdx)","description":"The maximum quantity required to be purchased for this money amount to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[CreatePriceSetPriceRules](../../../interfaces/pricing.CreatePriceSetPriceRules/page.mdx)","description":"The rules to add to the price. The object's keys are rule types' `rule_attribute` attribute, and values are the value of that rule associated with this price.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/pricing.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/pricing.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="create"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PriceSetDTO](../../../interfaces/pricing.PriceSetDTO/page.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The list of created price sets.","expandable":false,"children":[{"name":"PriceSetDTO[]","type":"[PriceSetDTO](../../../interfaces/pricing.PriceSetDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"PriceSetDTO","type":"`object`","description":"A price set's data.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="create"/>
@@ -0,0 +1,33 @@
---
displayed_sidebar: pricingReference
slug: /references/pricing/createPriceListRules
sidebar_label: createPriceListRules
---
import { TypeList } from "docs-ui"
# createPriceListRules - Pricing Module Reference
This documentation provides a reference to the `createPriceListRules` method. This belongs to the Pricing Module.
This method is used to create price list rules.
## Example
```ts
const priceListRules =
await pricingModuleService.createPriceListRules([
{
rule_type_id: "rul-typ_123",
price_list_id: "plist_123",
},
])
```
## Parameters
<TypeList types={[{"name":"data","type":"[CreatePriceListRuleDTO](../../../interfaces/pricing.CreatePriceListRuleDTO/page.mdx)[]","description":"The price list rules to create.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"rule_type_id","type":"`string`","description":"The ID of a rule type to be associated with the price list rule.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rule_type","type":"`string` \\| [RuleTypeDTO](../../../interfaces/pricing.RuleTypeDTO/page.mdx)","description":"The ID of a rule type or the details of an existing rule type to be associated with the price list rule.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"price_list_id","type":"`string`","description":"The ID of a price list to be associated with the price list rule.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"price_list","type":"`string` \\| [PriceListDTO](../../../interfaces/pricing.PriceListDTO/page.mdx)","description":"The ID of a price list or the details of an existing price list to be associated with the price list rule.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/pricing.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/pricing.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="createPriceListRules"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PriceListRuleDTO](../../../interfaces/pricing.PriceListRuleDTO/page.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The created price list rules.","expandable":false,"children":[{"name":"PriceListRuleDTO[]","type":"[PriceListRuleDTO](../../../interfaces/pricing.PriceListRuleDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"PriceListRuleDTO","type":"`object`","description":"The price list rule's details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="createPriceListRules"/>
@@ -0,0 +1,38 @@
---
displayed_sidebar: pricingReference
slug: /references/pricing/createPriceLists
sidebar_label: createPriceLists
---
import { TypeList } from "docs-ui"
# createPriceLists - Pricing Module Reference
This documentation provides a reference to the `createPriceLists` method. This belongs to the Pricing Module.
This method is used to create price lists.
## Example
```ts
const priceLists =
await pricingModuleService.createPriceLists([
{
title: "Sale 1",
description: "Summer sale",
},
{
title: "Sale 2",
description: "Winter sale",
starts_at: "2024-12-21",
},
])
```
## Parameters
<TypeList types={[{"name":"data","type":"[CreatePriceListDTO](../../../interfaces/pricing.CreatePriceListDTO/page.mdx)[]","description":"The details of each price list to be created.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"title","type":"`string`","description":"The price list's title.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The price list's description.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"starts_at","type":"`null` \\| `string`","description":"The price list is enabled starting from this date.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"ends_at","type":"`null` \\| `string`","description":"The price list expires after this date.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[PriceListStatus](../../../enums/pricing.PriceListStatus/page.mdx)","description":"The price list's status.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"ACTIVE","type":"`\"active\"`","description":"The price list is enabled and its prices can be used.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"DRAFT","type":"`\"draft\"`","description":"The price list is disabled, meaning its prices can't be used yet.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"type","type":"[PriceListType](../../../enums/pricing.PriceListType/page.mdx)","description":"The price list's type.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"SALE","type":"`\"sale\"`","description":"The price list's prices are used for a sale.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"OVERRIDE","type":"`\"override\"`","description":"The price list's prices override original prices. This affects the calculated price of associated price sets.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"rules_count","type":"`number`","description":"The number of rules associated with the price list.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[CreatePriceListRules](../../../interfaces/pricing.CreatePriceListRules/page.mdx)","description":"The rules to be created and associated with the price list.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"[CreatePriceListPriceDTO](../../../interfaces/pricing.CreatePriceListPriceDTO/page.mdx)[]","description":"The prices associated with the price list.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"currency_code","type":"`string`","description":"The currency code of this money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../../types/pricing.BigNumberInput/page.mdx)","description":"The amount of this money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_set_id","type":"`string`","description":"The ID of the associated price set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the money amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"`null` \\| [BigNumberInput](../../../types/pricing.BigNumberInput/page.mdx)","description":"The minimum quantity required to be purchased for this money amount to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"`null` \\| [BigNumberInput](../../../types/pricing.BigNumberInput/page.mdx)","description":"The maximum quantity required to be purchased for this money amount to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[CreatePriceSetPriceRules](../../../interfaces/pricing.CreatePriceSetPriceRules/page.mdx)","description":"The rules to add to the price. The object's keys are rule types' `rule_attribute` attribute, and values are the value of that rule associated with this price.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/pricing.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TMLine truncated
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PriceListDTO](../../../interfaces/pricing.PriceListDTO/page.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The created price lists.","expandable":false,"children":[{"name":"PriceListDTO[]","type":"[PriceListDTO](../../../interfaces/pricing.PriceListDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"PriceListDTO","type":"`object`","description":"A price list's details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="createPriceLists"/>
@@ -0,0 +1,34 @@
---
displayed_sidebar: pricingReference
slug: /references/pricing/createPriceRules
sidebar_label: createPriceRules
---
import { TypeList } from "docs-ui"
# createPriceRules - Pricing Module Reference
This documentation provides a reference to the `createPriceRules` method. This belongs to the Pricing Module.
This method is used to create new price rules based on the provided data.
## Example
```ts
const priceRules =
await pricingModuleService.createPriceRules([
{
value: "VIP",
rule_type_id: "rul-typ_123",
price_set_id: "pset_123",
},
])
```
## Parameters
<TypeList types={[{"name":"data","type":"[CreatePriceRuleDTO](../../../interfaces/pricing.CreatePriceRuleDTO/page.mdx)[]","description":"The price rules to create.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string`","description":"The value of the price rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_set_id","type":"`string`","description":"The ID of the associated price set.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rule_type_id","type":"`string`","description":"The ID of the associated rule type.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"priority","type":"`number`","description":"The priority of the price rule in comparison to other applicable price rules.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"price_id","type":"`string`","description":"The ID of the associated price.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/pricing.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/pricing.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="createPriceRules"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PriceRuleDTO](../../../interfaces/pricing.PriceRuleDTO/page.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The list of created price rules.","expandable":false,"children":[{"name":"PriceRuleDTO[]","type":"[PriceRuleDTO](../../../interfaces/pricing.PriceRuleDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"PriceRuleDTO","type":"`object`","description":"A price rule's data.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="createPriceRules"/>
@@ -0,0 +1,36 @@
---
displayed_sidebar: pricingReference
slug: /references/pricing/createRuleTypes
sidebar_label: createRuleTypes
---
import { TypeList } from "docs-ui"
# createRuleTypes - Pricing Module Reference
This documentation provides a reference to the `createRuleTypes` method. This belongs to the Pricing Module.
This method is used to create new rule types.
## Example
```ts
const ruleTypes = await pricingModuleService.createRuleTypes([
{
name: "Region",
rule_attribute: "region_id",
},
{
name: "Customer Group",
rule_attribute: "customer_group_id",
},
])
```
## Parameters
<TypeList types={[{"name":"data","type":"[CreateRuleTypeDTO](../../../interfaces/pricing.CreateRuleTypeDTO/page.mdx)[]","description":"The rule types to create.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The display name of the rule type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rule_attribute","type":"`string`","description":"The unique name used to later identify the rule\\_attribute. For example, it can be used in the `context` parameter of the `calculatePrices`\nmethod to specify a rule for calculating the price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the rule type.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"default_priority","type":"`number`","description":"The priority of the rule type. This is useful when calculating the price of a price set, and multiple rules satisfy the provided context.\nThe higher the value, the higher the priority of the rule type.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/pricing.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/pricing.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="createRuleTypes"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[RuleTypeDTO](../../../interfaces/pricing.RuleTypeDTO/page.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The list of created rule types.","expandable":false,"children":[{"name":"RuleTypeDTO[]","type":"[RuleTypeDTO](../../../interfaces/pricing.RuleTypeDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"RuleTypeDTO","type":"`object`","description":"A rule type's data.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="createRuleTypes"/>
@@ -0,0 +1,27 @@
---
displayed_sidebar: pricingReference
slug: /references/pricing/delete
sidebar_label: delete
---
import { TypeList } from "docs-ui"
# delete - Pricing Module Reference
This documentation provides a reference to the `delete` method. This belongs to the Pricing Module.
This method deletes price sets by their IDs.
## Example
```ts
await pricingModuleService.delete(["pset_123", "pset_321"])
```
## Parameters
<TypeList types={[{"name":"ids","type":"`string`[]","description":"The IDs of the price sets to delete.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sharedContext","type":"[Context](../../../interfaces/pricing.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/pricing.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="delete"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"Resolves when the price sets are successfully deleted.","expandable":false,"children":[]}]} sectionTitle="delete"/>
@@ -0,0 +1,30 @@
---
displayed_sidebar: pricingReference
slug: /references/pricing/deletePriceListRules
sidebar_label: deletePriceListRules
---
import { TypeList } from "docs-ui"
# deletePriceListRules - Pricing Module Reference
This documentation provides a reference to the `deletePriceListRules` method. This belongs to the Pricing Module.
This method is used to delete price list rules.
## Example
```ts
await pricingModuleService.deletePriceListRules([
"plrule_123",
"plrule_321",
])
```
## Parameters
<TypeList types={[{"name":"priceListRuleIds","type":"`string`[]","description":"The IDs of the price list rules to delete.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sharedContext","type":"[Context](../../../interfaces/pricing.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/pricing.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="deletePriceListRules"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"Resolves successfully when the price list rules are deleted.","expandable":false,"children":[]}]} sectionTitle="deletePriceListRules"/>
@@ -0,0 +1,30 @@
---
displayed_sidebar: pricingReference
slug: /references/pricing/deletePriceLists
sidebar_label: deletePriceLists
---
import { TypeList } from "docs-ui"
# deletePriceLists - Pricing Module Reference
This documentation provides a reference to the `deletePriceLists` method. This belongs to the Pricing Module.
This method is used to delete price lists.
## Example
```ts
await pricingModuleService.deletePriceLists([
"plist_123",
"plist_321",
])
```
## Parameters
<TypeList types={[{"name":"priceListIds","type":"`string`[]","description":"The IDs of the price lists to delete.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sharedContext","type":"[Context](../../../interfaces/pricing.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/pricing.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="deletePriceLists"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"Resolves when the price lists are deleted successfully.","expandable":false,"children":[]}]} sectionTitle="deletePriceLists"/>
@@ -0,0 +1,30 @@
---
displayed_sidebar: pricingReference
slug: /references/pricing/deletePriceRules
sidebar_label: deletePriceRules
---
import { TypeList } from "docs-ui"
# deletePriceRules - Pricing Module Reference
This documentation provides a reference to the `deletePriceRules` method. This belongs to the Pricing Module.
This method is used to delete price rules based on the specified IDs.
## Example
```ts
await pricingModuleService.deletePriceRules([
"prule_123",
"prule_321",
])
```
## Parameters
<TypeList types={[{"name":"priceRuleIds","type":"`string`[]","description":"The IDs of the price rules to delete.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sharedContext","type":"[Context](../../../interfaces/pricing.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/pricing.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="deletePriceRules"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"Resolves once the price rules are deleted.","expandable":false,"children":[]}]} sectionTitle="deletePriceRules"/>
@@ -0,0 +1,30 @@
---
displayed_sidebar: pricingReference
slug: /references/pricing/deleteRuleTypes
sidebar_label: deleteRuleTypes
---
import { TypeList } from "docs-ui"
# deleteRuleTypes - Pricing Module Reference
This documentation provides a reference to the `deleteRuleTypes` method. This belongs to the Pricing Module.
This method is used to delete rule types based on the provided IDs.
## Example
```ts
const ruleTypes = await pricingModuleService.deleteRuleTypes([
"rul-typ_123",
"rul-typ_321",
])
```
## Parameters
<TypeList types={[{"name":"ruleTypeIds","type":"`string`[]","description":"The IDs of the rule types to delete.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sharedContext","type":"[Context](../../../interfaces/pricing.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/pricing.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="deleteRuleTypes"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"Resolves once the rule types are deleted.","expandable":false,"children":[]}]} sectionTitle="deleteRuleTypes"/>
@@ -0,0 +1,59 @@
---
displayed_sidebar: pricingReference
slug: /references/pricing/list
sidebar_label: list
---
import { TypeList } from "docs-ui"
# list - Pricing Module Reference
This documentation provides a reference to the `list` method. This belongs to the Pricing Module.
This method is used to retrieve a paginated list of price sets based on optional filters and configuration.
## Example
To retrieve a list of price sets using their IDs:
```ts
const priceSets = await pricingModuleService.list({
id: ["pset_123", "pset_321"],
})
```
To specify relations that should be retrieved within the price sets:
```ts
const priceSets = await pricingModuleService.list(
{
id: ["pset_123", "pset_321"],
},
{
relations: ["prices"],
}
)
```
By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
```ts
const priceSets = await pricingModuleService.list(
{
id: ["pset_123", "pset_321"],
},
{
relations: ["prices"],
take: 20,
skip: 2,
}
)
```
## Parameters
<TypeList types={[{"name":"filters","type":"[FilterablePriceSetProps](../../../interfaces/pricing.FilterablePriceSetProps/page.mdx)","description":"The filters to apply on the retrieved price lists.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterablePriceSetProps](../../../interfaces/pricing.FilterablePriceSetProps/page.mdx) \\| [BaseFilterable](../../../interfaces/pricing.BaseFilterable/page.mdx)&#60;[FilterablePriceSetProps](../../../interfaces/pricing.FilterablePriceSetProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterablePriceSetProps](../../../interfaces/pricing.FilterablePriceSetProps/page.mdx) \\| [BaseFilterable](../../../interfaces/pricing.BaseFilterable/page.mdx)&#60;[FilterablePriceSetProps](../../../interfaces/pricing.FilterablePriceSetProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`[]","description":"IDs to filter price sets by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"money_amounts","type":"[FilterableMoneyAmountProps](../../../interfaces/pricing.FilterableMoneyAmountProps/page.mdx)","description":"Filters to apply on a price set's associated money amounts.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableMoneyAmountProps](../../../interfaces/pricing.FilterableMoneyAmountProps/page.mdx) \\| [BaseFilterable](../../../interfaces/pricing.BaseFilterable/page.mdx)&#60;[FilterableMoneyAmountProps](../../../interfaces/pricing.FilterableMoneyAmountProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableMoneyAmountProps](../../../interfaces/pricing.FilterableMoneyAmountProps/page.mdx) \\| [BaseFilterable](../../../interfaces/pricing.BaseFilterable/page.mdx)&#60;[FilterableMoneyAmountProps](../../../interfaces/pricing.FilterableMoneyAmountProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`[]","description":"IDs to filter money amounts by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string` \\| `string`[]","description":"Currency codes to filter money amounts by.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"config","type":"[FindConfig](../../../interfaces/pricing.FindConfig/page.mdx)&#60;[PriceSetDTO](../../../interfaces/pricing.PriceSetDTO/page.mdx)&#62;","description":"The configurations determining how the price sets are retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a price set.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"select","type":"(`string` \\| keyof Entity)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`object`","description":"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`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"filters","type":"`Record<string, any>`","description":"Enable ORM specific defined filters","optiLine truncated
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PriceSetDTO](../../../interfaces/pricing.PriceSetDTO/page.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The list of price sets.","expandable":false,"children":[{"name":"PriceSetDTO[]","type":"[PriceSetDTO](../../../interfaces/pricing.PriceSetDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"PriceSetDTO","type":"`object`","description":"A price set's data.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="list"/>
@@ -0,0 +1,62 @@
---
displayed_sidebar: pricingReference
slug: /references/pricing/listAndCount
sidebar_label: listAndCount
---
import { TypeList } from "docs-ui"
# listAndCount - Pricing Module Reference
This documentation provides a reference to the `listAndCount` method. This belongs to the Pricing Module.
This method is used to retrieve a paginated list of price sets along with the total count of available price sets satisfying the provided filters.
## Example
To retrieve a list of prices sets using their IDs:
```ts
const [priceSets, count] =
await pricingModuleService.listAndCount({
id: ["pset_123", "pset_321"],
})
```
To specify relations that should be retrieved within the price sets:
```ts
const [priceSets, count] =
await pricingModuleService.listAndCount(
{
id: ["pset_123", "pset_321"],
},
{
relations: ["prices"],
}
)
```
By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
```ts
const [priceSets, count] =
await pricingModuleService.listAndCount(
{
id: ["pset_123", "pset_321"],
},
{
relations: ["prices"],
take: 20,
skip: 2,
}
)
```
## Parameters
<TypeList types={[{"name":"filters","type":"[FilterablePriceSetProps](../../../interfaces/pricing.FilterablePriceSetProps/page.mdx)","description":"The filters to apply on the retrieved price lists.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterablePriceSetProps](../../../interfaces/pricing.FilterablePriceSetProps/page.mdx) \\| [BaseFilterable](../../../interfaces/pricing.BaseFilterable/page.mdx)&#60;[FilterablePriceSetProps](../../../interfaces/pricing.FilterablePriceSetProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterablePriceSetProps](../../../interfaces/pricing.FilterablePriceSetProps/page.mdx) \\| [BaseFilterable](../../../interfaces/pricing.BaseFilterable/page.mdx)&#60;[FilterablePriceSetProps](../../../interfaces/pricing.FilterablePriceSetProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`[]","description":"IDs to filter price sets by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"money_amounts","type":"[FilterableMoneyAmountProps](../../../interfaces/pricing.FilterableMoneyAmountProps/page.mdx)","description":"Filters to apply on a price set's associated money amounts.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableMoneyAmountProps](../../../interfaces/pricing.FilterableMoneyAmountProps/page.mdx) \\| [BaseFilterable](../../../interfaces/pricing.BaseFilterable/page.mdx)&#60;[FilterableMoneyAmountProps](../../../interfaces/pricing.FilterableMoneyAmountProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableMoneyAmountProps](../../../interfaces/pricing.FilterableMoneyAmountProps/page.mdx) \\| [BaseFilterable](../../../interfaces/pricing.BaseFilterable/page.mdx)&#60;[FilterableMoneyAmountProps](../../../interfaces/pricing.FilterableMoneyAmountProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`[]","description":"IDs to filter money amounts by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string` \\| `string`[]","description":"Currency codes to filter money amounts by.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"config","type":"[FindConfig](../../../interfaces/pricing.FindConfig/page.mdx)&#60;[PriceSetDTO](../../../interfaces/pricing.PriceSetDTO/page.mdx)&#62;","description":"The configurations determining how the price sets are retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a price set.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"select","type":"(`string` \\| keyof Entity)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`object`","description":"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`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"filters","type":"`Record<string, any>`","description":"Enable ORM specific defined filters","optiLine truncated
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[[PriceSetDTO](../../../interfaces/pricing.PriceSetDTO/page.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"The list of price sets along with their total count.","expandable":false,"children":[{"name":"PriceSetDTO[]","type":"[PriceSetDTO](../../../interfaces/pricing.PriceSetDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]},{"name":"number","type":"`number`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} sectionTitle="listAndCount"/>
@@ -0,0 +1,62 @@
---
displayed_sidebar: pricingReference
slug: /references/pricing/listAndCountPriceListRules
sidebar_label: listAndCountPriceListRules
---
import { TypeList } from "docs-ui"
# listAndCountPriceListRules - Pricing Module Reference
This documentation provides a reference to the `listAndCountPriceListRules` method. This belongs to the Pricing Module.
This method is used to retrieve a paginated list of price list ruless along with the total count of available price list ruless satisfying the provided filters.
## Example
To retrieve a list of price list vs using their IDs:
```ts
const [priceListRules, count] =
await pricingModuleService.listAndCountPriceListRules({
id: ["plrule_123", "plrule_321"],
})
```
To specify relations that should be retrieved within the price list rules:
```ts
const [priceListRules, count] =
await pricingModuleService.listAndCountPriceListRules(
{
id: ["plrule_123", "plrule_321"],
},
{
relations: ["price_list_rule_values"],
}
)
```
By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
```ts
const [priceListRules, count] =
await pricingModuleService.listAndCountPriceListRules(
{
id: ["plrule_123", "plrule_321"],
},
{
relations: ["price_list_rule_values"],
take: 20,
skip: 2,
}
)
```
## Parameters
<TypeList types={[{"name":"filters","type":"[FilterablePriceListRuleProps](../../../interfaces/pricing.FilterablePriceListRuleProps/page.mdx)","description":"The filters to apply on the retrieved price list rules.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterablePriceListRuleProps](../../../interfaces/pricing.FilterablePriceListRuleProps/page.mdx) \\| [BaseFilterable](../../../interfaces/pricing.BaseFilterable/page.mdx)&#60;[FilterablePriceListRuleProps](../../../interfaces/pricing.FilterablePriceListRuleProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterablePriceListRuleProps](../../../interfaces/pricing.FilterablePriceListRuleProps/page.mdx) \\| [BaseFilterable](../../../interfaces/pricing.BaseFilterable/page.mdx)&#60;[FilterablePriceListRuleProps](../../../interfaces/pricing.FilterablePriceListRuleProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`[]","description":"The IDs to filter price list rules by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`[]","description":"The values to filter price list rules by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rule_type","type":"`string`[]","description":"Filter price list rules by the ID of their associated rule types.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"price_list_id","type":"`string`[]","description":"Filter price list rules by the ID of their associated price lists.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"config","type":"[FindConfig](../../../interfaces/pricing.FindConfig/page.mdx)&#60;[PriceListRuleDTO](../../../interfaces/pricing.PriceListRuleDTO/page.mdx)&#62;","description":"The configurations determining how the price list rules are retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a price list rule.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"select","type":"(`string` \\| keyof Entity)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`object`","description":"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`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"filters","type":"`Record<string, any>`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/pricing.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","deLine truncated
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[[PriceListRuleDTO](../../../interfaces/pricing.PriceListRuleDTO/page.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"The list of price list rules along with their total count.","expandable":false,"children":[{"name":"PriceListRuleDTO[]","type":"[PriceListRuleDTO](../../../interfaces/pricing.PriceListRuleDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]},{"name":"number","type":"`number`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} sectionTitle="listAndCountPriceListRules"/>
@@ -0,0 +1,62 @@
---
displayed_sidebar: pricingReference
slug: /references/pricing/listAndCountPriceLists
sidebar_label: listAndCountPriceLists
---
import { TypeList } from "docs-ui"
# listAndCountPriceLists - Pricing Module Reference
This documentation provides a reference to the `listAndCountPriceLists` method. This belongs to the Pricing Module.
This method is used to retrieve a paginated list of price lists along with the total count of available price lists satisfying the provided filters.
## Example
To retrieve a list of price lists using their IDs:
```ts
const [priceLists, count] =
await pricingModuleService.listAndCountPriceLists({
id: ["plist_123", "plist_321"],
})
```
To specify relations that should be retrieved within the price lists:
```ts
const [priceLists, count] =
await pricingModuleService.listAndCountPriceLists(
{
id: ["plist_123", "plist_321"],
},
{
relations: ["prices"],
}
)
```
By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
```ts
const [priceLists, count] =
await pricingModuleService.listAndCountPriceLists(
{
id: ["plist_123", "plist_321"],
},
{
relations: ["prices"],
take: 20,
skip: 2,
}
)
```
## Parameters
<TypeList types={[{"name":"filters","type":"[FilterablePriceListProps](../../../interfaces/pricing.FilterablePriceListProps/page.mdx)","description":"The filters to apply on the retrieved price lists.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterablePriceListProps](../../../interfaces/pricing.FilterablePriceListProps/page.mdx) \\| [BaseFilterable](../../../interfaces/pricing.BaseFilterable/page.mdx)&#60;[FilterablePriceListProps](../../../interfaces/pricing.FilterablePriceListProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterablePriceListProps](../../../interfaces/pricing.FilterablePriceListProps/page.mdx) \\| [BaseFilterable](../../../interfaces/pricing.BaseFilterable/page.mdx)&#60;[FilterablePriceListProps](../../../interfaces/pricing.FilterablePriceListProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`[]","description":"The IDs to filter price lists by","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"starts_at","type":"`string`[]","description":"The start dates to filter price lists by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"ends_at","type":"`string`[]","description":"The end dates to filter price lists by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[PriceListStatus](../../../enums/pricing.PriceListStatus/page.mdx)[]","description":"The statuses to filter price lists by.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"ACTIVE","type":"`\"active\"`","description":"The price list is enabled and its prices can be used.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"DRAFT","type":"`\"draft\"`","description":"The price list is disabled, meaning its prices can't be used yet.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"rules_count","type":"`number`[]","description":"The number of rules to filter price lists by.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"config","type":"[FindConfig](../../../interfaces/pricing.FindConfig/page.mdx)&#60;[PriceListDTO](../../../interfaces/pricing.PriceListDTO/page.mdx)&#62;","description":"The configurations determining how the price lists are retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a price list.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"select","type":"(`string` \\| keyof Entity)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`object`","description":"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`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"filters","type":"`Record<string, any>`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/pricing.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter pasLine truncated
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[[PriceListDTO](../../../interfaces/pricing.PriceListDTO/page.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"The list of price lists along with their total count.","expandable":false,"children":[{"name":"PriceListDTO[]","type":"[PriceListDTO](../../../interfaces/pricing.PriceListDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]},{"name":"number","type":"`number`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} sectionTitle="listAndCountPriceLists"/>
@@ -0,0 +1,62 @@
---
displayed_sidebar: pricingReference
slug: /references/pricing/listAndCountPriceRules
sidebar_label: listAndCountPriceRules
---
import { TypeList } from "docs-ui"
# listAndCountPriceRules - Pricing Module Reference
This documentation provides a reference to the `listAndCountPriceRules` method. This belongs to the Pricing Module.
This method is used to retrieve a paginated list of price rules along with the total count of available price rules satisfying the provided filters.
## Example
To retrieve a list of price rules using their IDs:
```ts
const [priceRules, count] =
await pricingModuleService.listAndCountPriceListRules({
id: ["prule_123", "prule_321"],
})
```
To specify relations that should be retrieved within the price rules:
```ts
const [priceRules, count] =
await pricingModuleService.listAndCountPriceListRules(
{
id: ["prule_123", "prule_321"],
},
{
relations: ["price_set"],
}
)
```
By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
```ts
const [priceRules, count] =
await pricingModuleService.listAndCountPriceListRules(
{
id: ["prule_123", "prule_321"],
},
{
relations: ["price_set"],
take: 20,
skip: 2,
}
)
```
## Parameters
<TypeList types={[{"name":"filters","type":"[FilterablePriceRuleProps](../../../interfaces/pricing.FilterablePriceRuleProps/page.mdx)","description":"The filters to apply on the retrieved price rules.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterablePriceRuleProps](../../../interfaces/pricing.FilterablePriceRuleProps/page.mdx) \\| [BaseFilterable](../../../interfaces/pricing.BaseFilterable/page.mdx)&#60;[FilterablePriceRuleProps](../../../interfaces/pricing.FilterablePriceRuleProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterablePriceRuleProps](../../../interfaces/pricing.FilterablePriceRuleProps/page.mdx) \\| [BaseFilterable](../../../interfaces/pricing.BaseFilterable/page.mdx)&#60;[FilterablePriceRuleProps](../../../interfaces/pricing.FilterablePriceRuleProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`[]","description":"The IDs to filter price rules by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`[]","description":"The names to filter price rules by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"price_set_id","type":"`string`[]","description":"The IDs to filter the price rule's associated price set.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rule_type_id","type":"`string`[]","description":"The IDs to filter the price rule's associated rule type.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"config","type":"[FindConfig](../../../interfaces/pricing.FindConfig/page.mdx)&#60;[PriceRuleDTO](../../../interfaces/pricing.PriceRuleDTO/page.mdx)&#62;","description":"The configurations determining how the price rule is retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a price rule.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"select","type":"(`string` \\| keyof Entity)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`object`","description":"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`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"filters","type":"`Record<string, any>`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/pricing.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ Line truncated
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[[PriceRuleDTO](../../../interfaces/pricing.PriceRuleDTO/page.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"The list of price rules along with their total count.","expandable":false,"children":[{"name":"PriceRuleDTO[]","type":"[PriceRuleDTO](../../../interfaces/pricing.PriceRuleDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]},{"name":"number","type":"`number`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} sectionTitle="listAndCountPriceRules"/>
@@ -0,0 +1,62 @@
---
displayed_sidebar: pricingReference
slug: /references/pricing/listAndCountPrices
sidebar_label: listAndCountPrices
---
import { TypeList } from "docs-ui"
# listAndCountPrices - Pricing Module Reference
This documentation provides a reference to the `listAndCountPrices` method. This belongs to the Pricing Module.
This method is used to retrieve a paginated list of prices along with the total count of
available prices satisfying the provided filters.
## Example
To retrieve a list of prices using their IDs:
```ts
const [prices, count] = await pricingModuleService.listPrices(
{
id: ["price_123", "price_321"],
}
)
```
To specify relations that should be retrieved within the prices:
```ts
const [prices, count] = await pricingModuleService.listPrices(
{
id: ["price_123", "price_321"],
},
{
relations: ["price_rules"],
}
)
```
By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
```ts
const [prices, count] = await pricingModuleService.listPrices(
{
id: ["price_123", "price_321"],
},
{
relations: ["price_rules"],
take: 20,
skip: 2,
}
)
```
## Parameters
<TypeList types={[{"name":"filters","type":"[FilterablePriceProps](../../../interfaces/pricing.FilterablePriceProps/page.mdx)","description":"The filters to apply on the retrieved prices.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterablePriceProps](../../../interfaces/pricing.FilterablePriceProps/page.mdx) \\| [BaseFilterable](../../../interfaces/pricing.BaseFilterable/page.mdx)&#60;[FilterablePriceProps](../../../interfaces/pricing.FilterablePriceProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterablePriceProps](../../../interfaces/pricing.FilterablePriceProps/page.mdx) \\| [BaseFilterable](../../../interfaces/pricing.BaseFilterable/page.mdx)&#60;[FilterablePriceProps](../../../interfaces/pricing.FilterablePriceProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`[]","description":"The IDs to filter the prices by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string` \\| `string`[]","description":"Currency codes to filter price by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"price_set_id","type":"`string`[]","description":"The IDs to filter the price's associated price set.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"price_list_id","type":"`string`[]","description":"The IDs to filter the price's associated price list.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"config","type":"[FindConfig](../../../interfaces/pricing.FindConfig/page.mdx)&#60;[PriceDTO](../../../interfaces/pricing.PriceDTO/page.mdx)&#62;","description":"The configurations determining how the prices are retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a price.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"select","type":"(`string` \\| keyof Entity)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`object`","description":"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`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"filters","type":"`Record<string, any>`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/pricing.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`Line truncated
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[[PriceDTO](../../../interfaces/pricing.PriceDTO/page.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"The list of prices and their total count.","expandable":false,"children":[{"name":"PriceDTO[]","type":"[PriceDTO](../../../interfaces/pricing.PriceDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]},{"name":"number","type":"`number`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} sectionTitle="listAndCountPrices"/>
@@ -0,0 +1,62 @@
---
displayed_sidebar: pricingReference
slug: /references/pricing/listAndCountRuleTypes
sidebar_label: listAndCountRuleTypes
---
import { TypeList } from "docs-ui"
# listAndCountRuleTypes - Pricing Module Reference
This documentation provides a reference to the `listAndCountRuleTypes` method. This belongs to the Pricing Module.
This method is used to retrieve a paginated list of rule types along with the total count of available rule types satisfying the provided filters.
## Example
To retrieve a list of rule types using their IDs:
```ts
const [ruleTypes, count] =
await pricingModuleService.listAndCountRuleTypes({
id: ["rul-typ_123", "rul-typ_321"],
})
```
To specify attributes that should be retrieved within the rule types:
```ts
const [ruleTypes, count] =
await pricingModuleService.listAndCountRuleTypes(
{
id: ["rul-typ_123", "rul-typ_321"],
},
{
relations: ["price_sets"],
}
)
```
By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
```ts
const [ruleTypes, count] =
await pricingModuleService.listAndCountRuleTypes(
{
id: ["rul-typ_123", "rul-typ_321"],
},
{
relations: ["price_sets"],
take: 20,
skip: 2,
}
)
```
## Parameters
<TypeList types={[{"name":"filters","type":"[FilterableRuleTypeProps](../../../interfaces/pricing.FilterableRuleTypeProps/page.mdx)","description":"The filters to apply on the retrieved rule types.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableRuleTypeProps](../../../interfaces/pricing.FilterableRuleTypeProps/page.mdx) \\| [BaseFilterable](../../../interfaces/pricing.BaseFilterable/page.mdx)&#60;[FilterableRuleTypeProps](../../../interfaces/pricing.FilterableRuleTypeProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableRuleTypeProps](../../../interfaces/pricing.FilterableRuleTypeProps/page.mdx) \\| [BaseFilterable](../../../interfaces/pricing.BaseFilterable/page.mdx)&#60;[FilterableRuleTypeProps](../../../interfaces/pricing.FilterableRuleTypeProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`[]","description":"The IDs to filter rule types by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`[]","description":"The names to filter rule types by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rule_attribute","type":"`string`[]","description":"The rule attributes to filter rule types by.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"config","type":"[FindConfig](../../../interfaces/pricing.FindConfig/page.mdx)&#60;[RuleTypeDTO](../../../interfaces/pricing.RuleTypeDTO/page.mdx)&#62;","description":"The configurations determining how the rule types are retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a rule type.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"select","type":"(`string` \\| keyof Entity)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`object`","description":"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`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"filters","type":"`Record<string, any>`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/pricing.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"ALine truncated
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[[RuleTypeDTO](../../../interfaces/pricing.RuleTypeDTO/page.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"The list of rule types along with their total count.","expandable":false,"children":[{"name":"RuleTypeDTO[]","type":"[RuleTypeDTO](../../../interfaces/pricing.RuleTypeDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]},{"name":"number","type":"`number`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} sectionTitle="listAndCountRuleTypes"/>
@@ -0,0 +1,62 @@
---
displayed_sidebar: pricingReference
slug: /references/pricing/listPriceListRules
sidebar_label: listPriceListRules
---
import { TypeList } from "docs-ui"
# listPriceListRules - Pricing Module Reference
This documentation provides a reference to the `listPriceListRules` method. This belongs to the Pricing Module.
This method is used to retrieve a paginated list of price list rules based on optional filters and configuration.
## Example
To retrieve a list of price list vs using their IDs:
```ts
const priceListRules =
await pricingModuleService.listPriceListRules({
id: ["plrule_123", "plrule_321"],
})
```
To specify relations that should be retrieved within the price list rules:
```ts
const priceListRules =
await pricingModuleService.listPriceListRules(
{
id: ["plrule_123", "plrule_321"],
},
{
relations: ["price_list_rule_values"],
}
)
```
By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
```ts
const priceListRules =
await pricingModuleService.listPriceListRules(
{
id: ["plrule_123", "plrule_321"],
},
{
relations: ["price_list_rule_values"],
take: 20,
skip: 2,
}
)
```
## Parameters
<TypeList types={[{"name":"filters","type":"[FilterablePriceListRuleProps](../../../interfaces/pricing.FilterablePriceListRuleProps/page.mdx)","description":"The filters to apply on the retrieved price list rules.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterablePriceListRuleProps](../../../interfaces/pricing.FilterablePriceListRuleProps/page.mdx) \\| [BaseFilterable](../../../interfaces/pricing.BaseFilterable/page.mdx)&#60;[FilterablePriceListRuleProps](../../../interfaces/pricing.FilterablePriceListRuleProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterablePriceListRuleProps](../../../interfaces/pricing.FilterablePriceListRuleProps/page.mdx) \\| [BaseFilterable](../../../interfaces/pricing.BaseFilterable/page.mdx)&#60;[FilterablePriceListRuleProps](../../../interfaces/pricing.FilterablePriceListRuleProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`[]","description":"The IDs to filter price list rules by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`[]","description":"The values to filter price list rules by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rule_type","type":"`string`[]","description":"Filter price list rules by the ID of their associated rule types.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"price_list_id","type":"`string`[]","description":"Filter price list rules by the ID of their associated price lists.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"config","type":"[FindConfig](../../../interfaces/pricing.FindConfig/page.mdx)&#60;[PriceListRuleDTO](../../../interfaces/pricing.PriceListRuleDTO/page.mdx)&#62;","description":"The configurations determining how the price list rules are retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a price list rule.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"select","type":"(`string` \\| keyof Entity)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`object`","description":"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`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"filters","type":"`Record<string, any>`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/pricing.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","deLine truncated
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PriceListRuleDTO](../../../interfaces/pricing.PriceListRuleDTO/page.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The list of price list rules.","expandable":false,"children":[{"name":"PriceListRuleDTO[]","type":"[PriceListRuleDTO](../../../interfaces/pricing.PriceListRuleDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"PriceListRuleDTO","type":"`object`","description":"The price list rule's details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="listPriceListRules"/>
@@ -0,0 +1,59 @@
---
displayed_sidebar: pricingReference
slug: /references/pricing/listPriceLists
sidebar_label: listPriceLists
---
import { TypeList } from "docs-ui"
# listPriceLists - Pricing Module Reference
This documentation provides a reference to the `listPriceLists` method. This belongs to the Pricing Module.
This method is used to retrieve a paginated list of price lists based on optional filters and configuration.
## Example
To retrieve a list of price lists using their IDs:
```ts
const priceLists = await pricingModuleService.listPriceLists({
id: ["plist_123", "plist_321"],
})
```
To specify relations that should be retrieved within the price lists:
```ts
const priceLists = await pricingModuleService.listPriceLists(
{
id: ["plist_123", "plist_321"],
},
{
relations: ["prices"],
}
)
```
By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
```ts
const priceLists = await pricingModuleService.listPriceLists(
{
id: ["plist_123", "plist_321"],
},
{
relations: ["prices"],
take: 20,
skip: 2,
}
)
```
## Parameters
<TypeList types={[{"name":"filters","type":"[FilterablePriceListProps](../../../interfaces/pricing.FilterablePriceListProps/page.mdx)","description":"The filters to apply on the retrieved price lists.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterablePriceListProps](../../../interfaces/pricing.FilterablePriceListProps/page.mdx) \\| [BaseFilterable](../../../interfaces/pricing.BaseFilterable/page.mdx)&#60;[FilterablePriceListProps](../../../interfaces/pricing.FilterablePriceListProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterablePriceListProps](../../../interfaces/pricing.FilterablePriceListProps/page.mdx) \\| [BaseFilterable](../../../interfaces/pricing.BaseFilterable/page.mdx)&#60;[FilterablePriceListProps](../../../interfaces/pricing.FilterablePriceListProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`[]","description":"The IDs to filter price lists by","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"starts_at","type":"`string`[]","description":"The start dates to filter price lists by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"ends_at","type":"`string`[]","description":"The end dates to filter price lists by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[PriceListStatus](../../../enums/pricing.PriceListStatus/page.mdx)[]","description":"The statuses to filter price lists by.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"ACTIVE","type":"`\"active\"`","description":"The price list is enabled and its prices can be used.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"DRAFT","type":"`\"draft\"`","description":"The price list is disabled, meaning its prices can't be used yet.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"rules_count","type":"`number`[]","description":"The number of rules to filter price lists by.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"config","type":"[FindConfig](../../../interfaces/pricing.FindConfig/page.mdx)&#60;[PriceListDTO](../../../interfaces/pricing.PriceListDTO/page.mdx)&#62;","description":"The configurations determining how the price lists are retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a price list.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"select","type":"(`string` \\| keyof Entity)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`object`","description":"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`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"filters","type":"`Record<string, any>`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/pricing.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter pasLine truncated
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PriceListDTO](../../../interfaces/pricing.PriceListDTO/page.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The list of price lists.","expandable":false,"children":[{"name":"PriceListDTO[]","type":"[PriceListDTO](../../../interfaces/pricing.PriceListDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"PriceListDTO","type":"`object`","description":"A price list's details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="listPriceLists"/>
@@ -0,0 +1,59 @@
---
displayed_sidebar: pricingReference
slug: /references/pricing/listPriceRules
sidebar_label: listPriceRules
---
import { TypeList } from "docs-ui"
# listPriceRules - Pricing Module Reference
This documentation provides a reference to the `listPriceRules` method. This belongs to the Pricing Module.
This method is used to retrieve a paginated list of price rules based on optional filters and configuration.
## Example
To retrieve a list of price rules using their IDs:
```ts
const priceRules = await pricingModuleService.listPriceRules({
id: ["prule_123", "prule_321"],
})
```
To specify relations that should be retrieved within the price rules:
```ts
const priceRules = await pricingModuleService.listPriceRules(
{
id: ["prule_123", "prule_321"],
},
{
relations: ["price_set"],
}
)
```
By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
```ts
const priceRules = await pricingModuleService.listPriceRules(
{
id: ["prule_123", "prule_321"],
},
{
relations: ["price_set"],
take: 20,
skip: 2,
}
)
```
## Parameters
<TypeList types={[{"name":"filters","type":"[FilterablePriceRuleProps](../../../interfaces/pricing.FilterablePriceRuleProps/page.mdx)","description":"The filters to apply on the retrieved price rules.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterablePriceRuleProps](../../../interfaces/pricing.FilterablePriceRuleProps/page.mdx) \\| [BaseFilterable](../../../interfaces/pricing.BaseFilterable/page.mdx)&#60;[FilterablePriceRuleProps](../../../interfaces/pricing.FilterablePriceRuleProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterablePriceRuleProps](../../../interfaces/pricing.FilterablePriceRuleProps/page.mdx) \\| [BaseFilterable](../../../interfaces/pricing.BaseFilterable/page.mdx)&#60;[FilterablePriceRuleProps](../../../interfaces/pricing.FilterablePriceRuleProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`[]","description":"The IDs to filter price rules by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`[]","description":"The names to filter price rules by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"price_set_id","type":"`string`[]","description":"The IDs to filter the price rule's associated price set.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rule_type_id","type":"`string`[]","description":"The IDs to filter the price rule's associated rule type.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"config","type":"[FindConfig](../../../interfaces/pricing.FindConfig/page.mdx)&#60;[PriceRuleDTO](../../../interfaces/pricing.PriceRuleDTO/page.mdx)&#62;","description":"The configurations determining how the price rule is retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a price rule.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"select","type":"(`string` \\| keyof Entity)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`object`","description":"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`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"filters","type":"`Record<string, any>`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/pricing.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ Line truncated
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PriceRuleDTO](../../../interfaces/pricing.PriceRuleDTO/page.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The list of price rules.","expandable":false,"children":[{"name":"PriceRuleDTO[]","type":"[PriceRuleDTO](../../../interfaces/pricing.PriceRuleDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"PriceRuleDTO","type":"`object`","description":"A price rule's data.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="listPriceRules"/>
@@ -0,0 +1,59 @@
---
displayed_sidebar: pricingReference
slug: /references/pricing/listPrices
sidebar_label: listPrices
---
import { TypeList } from "docs-ui"
# listPrices - Pricing Module Reference
This documentation provides a reference to the `listPrices` method. This belongs to the Pricing Module.
This method is used to retrieve a paginated list of prices based on optional filters and configuration.
## Example
To retrieve a list of prices using their IDs:
```ts
const prices = await pricingModuleService.listPrices({
id: ["price_123", "price_321"],
})
```
To specify relations that should be retrieved within the prices:
```ts
const prices = await pricingModuleService.listPrices(
{
id: ["price_123", "price_321"],
},
{
relations: ["price_rules"],
}
)
```
By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
```ts
const prices = await pricingModuleService.listPrices(
{
id: ["price_123", "price_321"],
},
{
relations: ["price_rules"],
take: 20,
skip: 2,
}
)
```
## Parameters
<TypeList types={[{"name":"filters","type":"[FilterablePriceProps](../../../interfaces/pricing.FilterablePriceProps/page.mdx)","description":"The filters to apply on the retrieved prices.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterablePriceProps](../../../interfaces/pricing.FilterablePriceProps/page.mdx) \\| [BaseFilterable](../../../interfaces/pricing.BaseFilterable/page.mdx)&#60;[FilterablePriceProps](../../../interfaces/pricing.FilterablePriceProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterablePriceProps](../../../interfaces/pricing.FilterablePriceProps/page.mdx) \\| [BaseFilterable](../../../interfaces/pricing.BaseFilterable/page.mdx)&#60;[FilterablePriceProps](../../../interfaces/pricing.FilterablePriceProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`[]","description":"The IDs to filter the prices by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string` \\| `string`[]","description":"Currency codes to filter price by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"price_set_id","type":"`string`[]","description":"The IDs to filter the price's associated price set.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"price_list_id","type":"`string`[]","description":"The IDs to filter the price's associated price list.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"config","type":"[FindConfig](../../../interfaces/pricing.FindConfig/page.mdx)&#60;[PriceDTO](../../../interfaces/pricing.PriceDTO/page.mdx)&#62;","description":"The configurations determining how the prices are retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a price.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"select","type":"(`string` \\| keyof Entity)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`object`","description":"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`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"filters","type":"`Record<string, any>`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/pricing.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`Line truncated
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PriceDTO](../../../interfaces/pricing.PriceDTO/page.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The list of prices.","expandable":false,"children":[{"name":"PriceDTO[]","type":"[PriceDTO](../../../interfaces/pricing.PriceDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"PriceDTO","type":"`object`","description":"A price's data.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="listPrices"/>
@@ -0,0 +1,59 @@
---
displayed_sidebar: pricingReference
slug: /references/pricing/listRuleTypes
sidebar_label: listRuleTypes
---
import { TypeList } from "docs-ui"
# listRuleTypes - Pricing Module Reference
This documentation provides a reference to the `listRuleTypes` method. This belongs to the Pricing Module.
This method is used to retrieve a paginated list of rule types based on optional filters and configuration.
## Example
To retrieve a list of rule types using their IDs:
```ts
const ruleTypes = await pricingModuleService.listRuleTypes({
id: ["rul-typ_123", "rul-typ_321"],
})
```
To specify relations that should be retrieved:
```ts
const ruleTypes = await pricingModuleService.listRuleTypes(
{
id: ["rul-typ_123", "rul-typ_321"],
},
{
relations: ["price_sets"],
}
)
```
By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
```ts
const ruleTypes = await pricingModuleService.listRuleTypes(
{
id: ["rul-typ_123", "rul-typ_321"],
},
{
relations: ["price_sets"],
take: 20,
skip: 2,
}
)
```
## Parameters
<TypeList types={[{"name":"filters","type":"[FilterableRuleTypeProps](../../../interfaces/pricing.FilterableRuleTypeProps/page.mdx)","description":"The filters to apply on the retrieved rule types.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableRuleTypeProps](../../../interfaces/pricing.FilterableRuleTypeProps/page.mdx) \\| [BaseFilterable](../../../interfaces/pricing.BaseFilterable/page.mdx)&#60;[FilterableRuleTypeProps](../../../interfaces/pricing.FilterableRuleTypeProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableRuleTypeProps](../../../interfaces/pricing.FilterableRuleTypeProps/page.mdx) \\| [BaseFilterable](../../../interfaces/pricing.BaseFilterable/page.mdx)&#60;[FilterableRuleTypeProps](../../../interfaces/pricing.FilterableRuleTypeProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`[]","description":"The IDs to filter rule types by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`[]","description":"The names to filter rule types by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rule_attribute","type":"`string`[]","description":"The rule attributes to filter rule types by.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"config","type":"[FindConfig](../../../interfaces/pricing.FindConfig/page.mdx)&#60;[RuleTypeDTO](../../../interfaces/pricing.RuleTypeDTO/page.mdx)&#62;","description":"The configurations determining how the rule types are retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a rule type.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"select","type":"(`string` \\| keyof Entity)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`object`","description":"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`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"filters","type":"`Record<string, any>`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/pricing.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"ALine truncated
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[RuleTypeDTO](../../../interfaces/pricing.RuleTypeDTO/page.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The list of rule types.","expandable":false,"children":[{"name":"RuleTypeDTO[]","type":"[RuleTypeDTO](../../../interfaces/pricing.RuleTypeDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"RuleTypeDTO","type":"`object`","description":"A rule type's data.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="listRuleTypes"/>
@@ -0,0 +1,31 @@
---
displayed_sidebar: pricingReference
slug: /references/pricing/removePriceListRules
sidebar_label: removePriceListRules
---
import { TypeList } from "docs-ui"
# removePriceListRules - Pricing Module Reference
This documentation provides a reference to the `removePriceListRules` method. This belongs to the Pricing Module.
This method is used to remove rules from a price list.
## Example
```ts
const priceList =
await pricingModuleService.removePriceListRules({
price_list_id: "plist_123",
rules: ["region_id"],
})
```
## Parameters
<TypeList types={[{"name":"data","type":"[RemovePriceListRulesDTO](../../../interfaces/pricing.RemovePriceListRulesDTO/page.mdx)","description":"The rules to remove from a price list. The price list is identified by the\n`price_list_id` property.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"price_list_id","type":"`string`","description":"The ID of the price list to remove rules from.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"`string`[]","description":"The rules to remove from the price list. Each item being a rule type's `rule_attribute`.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/pricing.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/pricing.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="removePriceListRules"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PriceListDTO](../../../interfaces/pricing.PriceListDTO/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The updated price lists.","expandable":false,"children":[{"name":"PriceListDTO","type":"[PriceListDTO](../../../interfaces/pricing.PriceListDTO/page.mdx)","optional":false,"defaultValue":"","description":"A price list's details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The price list's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The price list's title.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"starts_at","type":"`null` \\| `string`","description":"The price list is enabled starting from this date.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[PriceListStatus](../../../enums/pricing.PriceListStatus/page.mdx)","description":"The price list's status.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"ACTIVE","type":"`\"active\"`","description":"The price list is enabled and its prices can be used.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"DRAFT","type":"`\"draft\"`","description":"The price list is disabled, meaning its prices can't be used yet.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"ends_at","type":"`null` \\| `string`","description":"The price list expires after this date.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules_count","type":"`number`","description":"The number of rules associated with this price list.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"[PriceDTO](../../../interfaces/pricing.PriceDTO/page.mdx)[]","description":"The associated price set money amounts.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of a price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"When the price was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"When the price was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"When the price was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The title of the price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency code of this price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../../types/pricing.BigNumberValue/page.mdx)","description":"The price of this price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"[BigNumberValue](../../../types/pricing.BigNumberValue/page.mdx)","description":"The minimum quantity required to be purchased for this price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"[BigNumberValue](../../../types/pricing.BigNumberValue/page.mdx)","description":"The maximum quantity required to be purchased for this price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"price_set","type":"[PriceSetDTO](../../../interfaces/pricing.PriceSetDTO/page.mdx)","description":"The price set associated with the price.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"price_list","type":"[PriceListDTO](../../../interfaces/pricing.PriceListDTO/page.mdx)","description":"The price list associated with the price.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"price_set_id","type":"`string`","description":"The ID of the associated price set.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"price_rules","type":"[PriceRuleDTO](../../../interfaces/pricing.PriceRuleDTO/page.mdx)[]","description":"The price rules associated with the price.","optional":true,"defaultValue":"","expandable":true,"children":[]}]},{"name":"money_amounts","type":"[MoneyAmountDTO](../../../interfaces/pricing.MoneyAmountDTO/page.mdx)[]","description":"The associated money amounts.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"When the money\\_amount was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","tLine truncated
@@ -0,0 +1,30 @@
---
displayed_sidebar: pricingReference
slug: /references/pricing/removePrices
sidebar_label: removePrices
---
import { TypeList } from "docs-ui"
# removePrices - Pricing Module Reference
This documentation provides a reference to the `removePrices` method. This belongs to the Pricing Module.
This method deletes prices by their IDs.
## Example
```ts
await pricingModuleService.removePrices([
"price_123",
"price_321",
])
```
## Parameters
<TypeList types={[{"name":"ids","type":"`string`[]","description":"The IDs of the prices.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sharedContext","type":"[Context](../../../interfaces/pricing.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/pricing.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="removePrices"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"Resolves when the prices are deleted successfully.","expandable":false,"children":[]}]} sectionTitle="removePrices"/>
@@ -0,0 +1,32 @@
---
displayed_sidebar: pricingReference
slug: /references/pricing/removeRules
sidebar_label: removeRules
---
import { TypeList } from "docs-ui"
# removeRules - Pricing Module Reference
This documentation provides a reference to the `removeRules` method. This belongs to the Pricing Module.
This method remove rules from a price set.
## Example
```ts
await pricingModuleService.removeRules([
{
id: "pset_123",
rules: ["region_id"],
},
])
```
## Parameters
<TypeList types={[{"name":"data","type":"[RemovePriceSetRulesDTO](../../../interfaces/pricing.RemovePriceSetRulesDTO/page.mdx)[]","description":"The rules to remove per price set.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the price set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"`string`[]","description":"The rules to remove. Each string is the `rule_attribute` of a rule to remove.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/pricing.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/pricing.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="removeRules"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"Resolves when rules are successfully removed.","expandable":false,"children":[]}]} sectionTitle="removeRules"/>
@@ -0,0 +1,30 @@
---
displayed_sidebar: pricingReference
slug: /references/pricing/restorePriceLists
sidebar_label: restorePriceLists
---
import { TypeList } from "docs-ui"
# restorePriceLists - Pricing Module Reference
This documentation provides a reference to the `restorePriceLists` method. This belongs to the Pricing Module.
This method restores a soft deleted price lists by its IDs.
## Example
```ts
await pricingModuleService.restorePriceLists([
"plist_123",
"plist_321",
])
```
## Parameters
<TypeList types={[{"name":"priceListIds","type":"`string`[]","description":"The list of &#123;summary&#125;","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[RestoreReturn](../../../interfaces/pricing.RestoreReturn/page.mdx)&#60;TReturnableLinkableKeys&#62;","description":"Configurations determining which relations to restore along with each of the price lists. You can pass to its `returnLinkableKeys`\nproperty any of the price list's relation attribute names, such as `price_list_rules`.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"returnLinkableKeys","type":"TReturnableLinkableKeys[]","description":"An array of strings, each being the ID attribute names of the entity's relations.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/pricing.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/pricing.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="restorePriceLists"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;void \\| Record&#60;string, string[]&#62;&#62;","optional":false,"defaultValue":"","description":"An object that includes the IDs of related records that were restored, such as the ID of associated price list rules.\nThe object's keys are the ID attribute names of the price list entity's relations, such as `price_list_rule_id`,\nand its value is an array of strings, each being the ID of the record associated with the price list through this relation,\nsuch as the IDs of associated price list rules.\n\nIf there are no related records restored, the promise resolves to `void`.","expandable":false,"children":[{"name":"void \\| Record&#60;string, string[]&#62;","type":"`void` \\| `Record<string, string[]>`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} sectionTitle="restorePriceLists"/>
@@ -0,0 +1,30 @@
---
displayed_sidebar: pricingReference
slug: /references/pricing/restorePrices
sidebar_label: restorePrices
---
import { TypeList } from "docs-ui"
# restorePrices - Pricing Module Reference
This documentation provides a reference to the `restorePrices` method. This belongs to the Pricing Module.
This method restores soft deleted prices by their IDs.
## Example
```ts
await pricingModuleService.restorePrices([
"price_123",
"price_321",
])
```
## Parameters
<TypeList types={[{"name":"priceIds","type":"`string`[]","description":"The IDs of the prices.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[RestoreReturn](../../../interfaces/pricing.RestoreReturn/page.mdx)&#60;TReturnableLinkableKeys&#62;","description":"Configurations determining which relations to restore along with each of the prices. You can pass to its `returnLinkableKeys`\nproperty any of the price's relation attribute names, such as price\\_rules`.\n@param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.\n@returns {Promise<void | Record<string, string[]>>} An object that includes the IDs of related records that were restored, such as the ID of associated price rules.\nThe object's keys are the ID attribute names of the prices entity's relations, such as `price\\_rule\\_id`,\nand its value is an array of strings, each being the ID of the record associated with the prices through this relation,\nsuch as the IDs of associated price rules.\n\nIf there are no related records restored, the promise resolves to `void`.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"returnLinkableKeys","type":"TReturnableLinkableKeys[]","description":"An array of strings, each being the ID attribute names of the entity's relations.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/pricing.Context/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/pricing.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="restorePrices"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;void \\| Record&#60;string, string[]&#62;&#62;","optional":false,"defaultValue":"","description":"This method restores soft deleted prices by their IDs.","expandable":false,"children":[{"name":"void \\| Record&#60;string, string[]&#62;","type":"`void` \\| `Record<string, string[]>`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} sectionTitle="restorePrices"/>
@@ -0,0 +1,41 @@
---
displayed_sidebar: pricingReference
slug: /references/pricing/retrieve
sidebar_label: retrieve
---
import { TypeList } from "docs-ui"
# retrieve - Pricing Module Reference
This documentation provides a reference to the `retrieve` method. This belongs to the Pricing Module.
This method is used to retrieve a price set by its ID.
## Example
A simple example that retrieves a price set by its ID:
```ts
const priceSet =
await pricingModuleService.retrieve("pset_123")
```
To specify relations that should be retrieved:
```ts
const priceSet = await pricingModuleService.retrieve(
"pset_123",
{
relations: ["prices"],
}
)
```
## Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the price set to retrieve.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../../interfaces/pricing.FindConfig/page.mdx)&#60;[PriceSetDTO](../../../interfaces/pricing.PriceSetDTO/page.mdx)&#62;","description":"The configurations determining how the price set is retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a price set.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"select","type":"(`string` \\| keyof Entity)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`object`","description":"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`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"filters","type":"`Record<string, any>`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/pricing.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/pricing.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="retrieve"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PriceSetDTO](../../../interfaces/pricing.PriceSetDTO/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The retrieved price set.","expandable":false,"children":[{"name":"PriceSetDTO","type":"[PriceSetDTO](../../../interfaces/pricing.PriceSetDTO/page.mdx)","optional":false,"defaultValue":"","description":"A price set's data.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the price set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"[MoneyAmountDTO](../../../interfaces/pricing.MoneyAmountDTO/page.mdx)[]","description":"The prices that belong to this price set.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"When the money\\_amount was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"When the money\\_amount was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"When the money\\_amount was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency code of this money amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../../types/pricing.BigNumberValue/page.mdx)","description":"The price of this money amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"[BigNumberValue](../../../types/pricing.BigNumberValue/page.mdx)","description":"The minimum quantity required to be purchased for this price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"[BigNumberValue](../../../types/pricing.BigNumberValue/page.mdx)","description":"The maximum quantity required to be purchased for this price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"rule_types","type":"[RuleTypeDTO](../../../interfaces/pricing.RuleTypeDTO/page.mdx)[]","description":"The rule types applied on this price set.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the rule type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The display name of the rule type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rule_attribute","type":"`string`","description":"The unique name used to later identify the rule\\_attribute. For example, it can be used in the `context` parameter of\nthe `calculatePrices` method to specify a rule for calculating the price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_priority","type":"`number`","description":"The priority of the rule type. This is useful when calculating the price of a price set, and multiple rules satisfy\nthe provided context. The higher the value, the higher the priority of the rule type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the rule type.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the rule type.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]}]} sectionTitle="retrieve"/>
@@ -0,0 +1,39 @@
---
displayed_sidebar: pricingReference
slug: /references/pricing/retrievePriceList
sidebar_label: retrievePriceList
---
import { TypeList } from "docs-ui"
# retrievePriceList - Pricing Module Reference
This documentation provides a reference to the `retrievePriceList` method. This belongs to the Pricing Module.
This method is used to retrieve a price list by its ID.
## Example
A simple example that retrieves a price list by its ID:
```ts
const priceList =
await pricingModuleService.retrievePriceList("plist_123")
```
To specify relations that should be retrieved:
```ts
const priceList =
await pricingModuleService.retrievePriceList("plist_123", {
relations: ["prices"],
})
```
## Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the price list to retrieve.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../../interfaces/pricing.FindConfig/page.mdx)&#60;[PriceListDTO](../../../interfaces/pricing.PriceListDTO/page.mdx)&#62;","description":"The configurations determining how the price list is retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a price list.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"select","type":"(`string` \\| keyof Entity)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`object`","description":"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`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"filters","type":"`Record<string, any>`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/pricing.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/pricing.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="retrievePriceList"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PriceListDTO](../../../interfaces/pricing.PriceListDTO/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The retrieved price list.","expandable":false,"children":[{"name":"PriceListDTO","type":"[PriceListDTO](../../../interfaces/pricing.PriceListDTO/page.mdx)","optional":false,"defaultValue":"","description":"A price list's details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The price list's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The price list's title.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"starts_at","type":"`null` \\| `string`","description":"The price list is enabled starting from this date.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[PriceListStatus](../../../enums/pricing.PriceListStatus/page.mdx)","description":"The price list's status.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"ACTIVE","type":"`\"active\"`","description":"The price list is enabled and its prices can be used.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"DRAFT","type":"`\"draft\"`","description":"The price list is disabled, meaning its prices can't be used yet.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"ends_at","type":"`null` \\| `string`","description":"The price list expires after this date.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules_count","type":"`number`","description":"The number of rules associated with this price list.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"[PriceDTO](../../../interfaces/pricing.PriceDTO/page.mdx)[]","description":"The associated price set money amounts.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of a price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"When the price was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"When the price was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"When the price was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The title of the price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency code of this price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../../types/pricing.BigNumberValue/page.mdx)","description":"The price of this price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"[BigNumberValue](../../../types/pricing.BigNumberValue/page.mdx)","description":"The minimum quantity required to be purchased for this price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"[BigNumberValue](../../../types/pricing.BigNumberValue/page.mdx)","description":"The maximum quantity required to be purchased for this price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"price_set","type":"[PriceSetDTO](../../../interfaces/pricing.PriceSetDTO/page.mdx)","description":"The price set associated with the price.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"price_list","type":"[PriceListDTO](../../../interfaces/pricing.PriceListDTO/page.mdx)","description":"The price list associated with the price.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"price_set_id","type":"`string`","description":"The ID of the associated price set.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"price_rules","type":"[PriceRuleDTO](../../../interfaces/pricing.PriceRuleDTO/page.mdx)[]","description":"The price rules associated with the price.","optional":true,"defaultValue":"","expandable":true,"children":[]}]},{"name":"money_amounts","type":"[MoneyAmountDTO](../../../interfaces/pricing.MoneyAmountDTO/page.mdx)[]","description":"The associated money amounts.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"When the money\\_amount was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","Line truncated
@@ -0,0 +1,44 @@
---
displayed_sidebar: pricingReference
slug: /references/pricing/retrievePriceListRule
sidebar_label: retrievePriceListRule
---
import { TypeList } from "docs-ui"
# retrievePriceListRule - Pricing Module Reference
This documentation provides a reference to the `retrievePriceListRule` method. This belongs to the Pricing Module.
This method is used to retrieve a price list rule by its ID.
## Example
A simple example that retrieves a price list rule by its ID:
```ts
const priceListRule =
await pricingModuleService.retrievePriceListRule(
"plrule_123"
)
```
To specify relations that should be retrieved:
```ts
const priceListRule =
await pricingModuleService.retrievePriceListRule(
"plrule_123",
{
relations: ["price_list"],
}
)
```
## Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the price list rule to retrieve.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../../interfaces/pricing.FindConfig/page.mdx)&#60;[PriceListRuleDTO](../../../interfaces/pricing.PriceListRuleDTO/page.mdx)&#62;","description":"The configurations determining how the price list rule is retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a price list rule.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"select","type":"(`string` \\| keyof Entity)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`object`","description":"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`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"filters","type":"`Record<string, any>`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/pricing.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/pricing.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="retrievePriceListRule"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PriceListRuleDTO](../../../interfaces/pricing.PriceListRuleDTO/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The retrieved price list rule.","expandable":false,"children":[{"name":"PriceListRuleDTO","type":"[PriceListRuleDTO](../../../interfaces/pricing.PriceListRuleDTO/page.mdx)","optional":false,"defaultValue":"","description":"The price list rule's details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The price list rule's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The value of the rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rule_type","type":"[RuleTypeDTO](../../../interfaces/pricing.RuleTypeDTO/page.mdx)","description":"The associated rule type.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the rule type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The display name of the rule type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rule_attribute","type":"`string`","description":"The unique name used to later identify the rule\\_attribute. For example, it can be used in the `context` parameter of\nthe `calculatePrices` method to specify a rule for calculating the price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_priority","type":"`number`","description":"The priority of the rule type. This is useful when calculating the price of a price set, and multiple rules satisfy\nthe provided context. The higher the value, the higher the priority of the rule type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the rule type.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the rule type.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"price_list","type":"[PriceListDTO](../../../interfaces/pricing.PriceListDTO/page.mdx)","description":"The associated price list.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The price list's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The price list's title.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"starts_at","type":"`null` \\| `string`","description":"The price list is enabled starting from this date.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[PriceListStatus](../../../enums/pricing.PriceListStatus/page.mdx)","description":"The price list's status.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"ends_at","type":"`null` \\| `string`","description":"The price list expires after this date.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules_count","type":"`number`","description":"The number of rules associated with this price list.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"[PriceDTO](../../../interfaces/pricing.PriceDTO/page.mdx)[]","description":"The associated price set money amounts.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"money_amounts","type":"[MoneyAmountDTO](../../../interfaces/pricing.MoneyAmountDTO/page.mdx)[]","description":"The associated money amounts.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"rule_types","type":"[RuleTypeDTO](../../../interfaces/pricing.RuleTypeDTO/page.mdx)[]","description":"The associated rule types.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"rules","type":"[PriceListRuleDTO](../../../interfaces/pricing.PriceListRuleDTO/page.mdx)[]","description":"The price set's rules.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"price_list_rules","type":"[PriceListRuleDTO](../../../interfaces/pricing.PriceListRuleDTO/page.mdx)[]","description":"The price set's rules.","optional":true,"defaultValue":"","expandable":true,"children":[]}]},{"name":"price_list_rule_values","type":"[PriceListRuleValueDTO](../../../interfaces/pricing.PriceListRuleValueDTO/page.mdx)[]","description":"The associated rule values.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The price list rule value's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The rule's value.","optional":false,"defaultLine truncated
@@ -0,0 +1,39 @@
---
displayed_sidebar: pricingReference
slug: /references/pricing/retrievePriceRule
sidebar_label: retrievePriceRule
---
import { TypeList } from "docs-ui"
# retrievePriceRule - Pricing Module Reference
This documentation provides a reference to the `retrievePriceRule` method. This belongs to the Pricing Module.
This method is used to retrieve a price rule by its ID.
## Example
A simple example that retrieves a price rule by its ID:
```ts
const priceRule =
await pricingModuleService.retrievePriceRule("prule_123")
```
To specify relations that should be retrieved:
```ts
const priceRule =
await pricingModuleService.retrievePriceRule("prule_123", {
relations: ["price_set"],
})
```
## Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the price rule to retrieve.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../../interfaces/pricing.FindConfig/page.mdx)&#60;[PriceRuleDTO](../../../interfaces/pricing.PriceRuleDTO/page.mdx)&#62;","description":"The configurations determining how the price rule is retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a price rule.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"select","type":"(`string` \\| keyof Entity)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`object`","description":"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`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"filters","type":"`Record<string, any>`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/pricing.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/pricing.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="retrievePriceRule"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PriceRuleDTO](../../../interfaces/pricing.PriceRuleDTO/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The retrieved price rule.","expandable":false,"children":[{"name":"PriceRuleDTO","type":"[PriceRuleDTO](../../../interfaces/pricing.PriceRuleDTO/page.mdx)","optional":false,"defaultValue":"","description":"A price rule's data.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the price rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_set_id","type":"`string`","description":"The ID of the associated price set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_set","type":"[PriceSetDTO](../../../interfaces/pricing.PriceSetDTO/page.mdx)","description":"The associated price set.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the price set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"[MoneyAmountDTO](../../../interfaces/pricing.MoneyAmountDTO/page.mdx)[]","description":"The prices that belong to this price set.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rule_types","type":"[RuleTypeDTO](../../../interfaces/pricing.RuleTypeDTO/page.mdx)[]","description":"The rule types applied on this price set.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"rule_type_id","type":"`string`","description":"The ID of the associated rule type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rule_type","type":"[RuleTypeDTO](../../../interfaces/pricing.RuleTypeDTO/page.mdx)","description":"The associated rule type.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the rule type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The display name of the rule type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rule_attribute","type":"`string`","description":"The unique name used to later identify the rule\\_attribute. For example, it can be used in the `context` parameter of\nthe `calculatePrices` method to specify a rule for calculating the price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_priority","type":"`number`","description":"The priority of the rule type. This is useful when calculating the price of a price set, and multiple rules satisfy\nthe provided context. The higher the value, the higher the priority of the rule type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the rule type.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the rule type.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"value","type":"`string`","description":"The value of the price rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"priority","type":"`number`","description":"The priority of the price rule in comparison to other applicable price rules.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_id","type":"`string`","description":"The ID of the associated price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_list_id","type":"`string`","description":"The ID of the associated price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"When the price\\_rule was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"When the price\\_rule was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"When the price\\_rule was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="retrievePriceRule"/>
@@ -0,0 +1,41 @@
---
displayed_sidebar: pricingReference
slug: /references/pricing/retrieveRuleType
sidebar_label: retrieveRuleType
---
import { TypeList } from "docs-ui"
# retrieveRuleType - Pricing Module Reference
This documentation provides a reference to the `retrieveRuleType` method. This belongs to the Pricing Module.
This method is used to retrieve a rule type by its ID and and optionally based on the provided configurations.
## Example
A simple example that retrieves a rule type by its code:
```ts
const ruleType =
await pricingModuleService.retrieveRuleType("rul-typ_123")
```
To specify relations that should be retrieved:
```ts
const ruleType = await pricingModuleService.retrieveRuleType(
"rul-typ_123",
{
relations: ["price_sets"],
}
)
```
## Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the rule type to retrieve.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../../interfaces/pricing.FindConfig/page.mdx)&#60;[RuleTypeDTO](../../../interfaces/pricing.RuleTypeDTO/page.mdx)&#62;","description":"The configurations determining how the rule type is retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a rule type.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"select","type":"(`string` \\| keyof Entity)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`object`","description":"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`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"filters","type":"`Record<string, any>`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/pricing.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/pricing.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="retrieveRuleType"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[RuleTypeDTO](../../../interfaces/pricing.RuleTypeDTO/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The retrieved rule type.","expandable":false,"children":[{"name":"RuleTypeDTO","type":"[RuleTypeDTO](../../../interfaces/pricing.RuleTypeDTO/page.mdx)","optional":false,"defaultValue":"","description":"A rule type's data.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the rule type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The display name of the rule type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rule_attribute","type":"`string`","description":"The unique name used to later identify the rule\\_attribute. For example, it can be used in the `context` parameter of\nthe `calculatePrices` method to specify a rule for calculating the price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_priority","type":"`number`","description":"The priority of the rule type. This is useful when calculating the price of a price set, and multiple rules satisfy\nthe provided context. The higher the value, the higher the priority of the rule type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the rule type.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the rule type.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="retrieveRuleType"/>
@@ -0,0 +1,33 @@
---
displayed_sidebar: pricingReference
slug: /references/pricing/setPriceListRules
sidebar_label: setPriceListRules
---
import { TypeList } from "docs-ui"
# setPriceListRules - Pricing Module Reference
This documentation provides a reference to the `setPriceListRules` method. This belongs to the Pricing Module.
This method is used to set the rules of a price list. Previous rules are removed.
## Example
```ts
const priceList =
await pricingModuleService.setPriceListRules({
price_list_id: "plist_123",
rules: {
region_id: "reg_123",
},
})
```
## Parameters
<TypeList types={[{"name":"data","type":"[SetPriceListRulesDTO](../../../interfaces/pricing.SetPriceListRulesDTO/page.mdx)","description":"The rules to set for a price list. The price list is identified by the\n`price_list_id` property.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"price_list_id","type":"`string`","description":"The ID of the price list to set its rules.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"`Record<string, string \\| string[]>`","description":"The rules to add to the price list. Each key of the object is a rule type's `rule_attribute`, and its value\nis the value(s) of the rule.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/pricing.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/pricing.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="setPriceListRules"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PriceListDTO](../../../interfaces/pricing.PriceListDTO/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The updated price list's prices.","expandable":false,"children":[{"name":"PriceListDTO","type":"[PriceListDTO](../../../interfaces/pricing.PriceListDTO/page.mdx)","optional":false,"defaultValue":"","description":"A price list's details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The price list's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The price list's title.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"starts_at","type":"`null` \\| `string`","description":"The price list is enabled starting from this date.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[PriceListStatus](../../../enums/pricing.PriceListStatus/page.mdx)","description":"The price list's status.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"ACTIVE","type":"`\"active\"`","description":"The price list is enabled and its prices can be used.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"DRAFT","type":"`\"draft\"`","description":"The price list is disabled, meaning its prices can't be used yet.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"ends_at","type":"`null` \\| `string`","description":"The price list expires after this date.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules_count","type":"`number`","description":"The number of rules associated with this price list.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"[PriceDTO](../../../interfaces/pricing.PriceDTO/page.mdx)[]","description":"The associated price set money amounts.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of a price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"When the price was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"When the price was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"When the price was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The title of the price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency code of this price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../../types/pricing.BigNumberValue/page.mdx)","description":"The price of this price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"[BigNumberValue](../../../types/pricing.BigNumberValue/page.mdx)","description":"The minimum quantity required to be purchased for this price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"[BigNumberValue](../../../types/pricing.BigNumberValue/page.mdx)","description":"The maximum quantity required to be purchased for this price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"price_set","type":"[PriceSetDTO](../../../interfaces/pricing.PriceSetDTO/page.mdx)","description":"The price set associated with the price.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"price_list","type":"[PriceListDTO](../../../interfaces/pricing.PriceListDTO/page.mdx)","description":"The price list associated with the price.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"price_set_id","type":"`string`","description":"The ID of the associated price set.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"price_rules","type":"[PriceRuleDTO](../../../interfaces/pricing.PriceRuleDTO/page.mdx)[]","description":"The price rules associated with the price.","optional":true,"defaultValue":"","expandable":true,"children":[]}]},{"name":"money_amounts","type":"[MoneyAmountDTO](../../../interfaces/pricing.MoneyAmountDTO/page.mdx)[]","description":"The associated money amounts.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"When the money\\_amount was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updateLine truncated
@@ -0,0 +1,30 @@
---
displayed_sidebar: pricingReference
slug: /references/pricing/softDeletePriceLists
sidebar_label: softDeletePriceLists
---
import { TypeList } from "docs-ui"
# softDeletePriceLists - Pricing Module Reference
This documentation provides a reference to the `softDeletePriceLists` method. This belongs to the Pricing Module.
This method soft deletes price lists by their IDs.
## Example
```ts
await pricingModuleService.softDeletePriceLists([
"plist_123",
"plist_321",
])
```
## Parameters
<TypeList types={[{"name":"priceListIds","type":"`string`[]","description":"The IDs of the price lists.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[SoftDeleteReturn](../../../interfaces/pricing.SoftDeleteReturn/page.mdx)&#60;TReturnableLinkableKeys&#62;","description":"An object that is used to specify an entity's related entities that should be soft-deleted when the main entity is soft-deleted.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"returnLinkableKeys","type":"TReturnableLinkableKeys[]","description":"An array of strings, each being the ID attribute names of the entity's relations.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/pricing.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/pricing.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="softDeletePriceLists"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;void \\| Record&#60;string, string[]&#62;&#62;","optional":false,"defaultValue":"","description":"An object that includes the IDs of related records that were also soft deleted, such as the ID of the associated price list rules.\nThe object's keys are the ID attribute names of the price list entity's relations, such as `price_list_rule_id`, and its value is an array of strings, each being the ID of a record associated\nwith the price list through this relation, such as the IDs of associated price list rule.\n\nIf there are no related records, the promise resolves to `void`.","expandable":false,"children":[{"name":"void \\| Record&#60;string, string[]&#62;","type":"`void` \\| `Record<string, string[]>`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} sectionTitle="softDeletePriceLists"/>
@@ -0,0 +1,30 @@
---
displayed_sidebar: pricingReference
slug: /references/pricing/softDeletePrices
sidebar_label: softDeletePrices
---
import { TypeList } from "docs-ui"
# softDeletePrices - Pricing Module Reference
This documentation provides a reference to the `softDeletePrices` method. This belongs to the Pricing Module.
This method soft deletes prices by their IDs.
## Example
```ts
await pricingModuleService.softDeletePrices([
"price_123",
"price_321",
])
```
## Parameters
<TypeList types={[{"name":"priceIds","type":"`string`[]","description":"The IDs of the prices.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[SoftDeleteReturn](../../../interfaces/pricing.SoftDeleteReturn/page.mdx)&#60;TReturnableLinkableKeys&#62;","description":"An object that is used to specify an entity's related entities that should be soft-deleted when the main entity is soft-deleted.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"returnLinkableKeys","type":"TReturnableLinkableKeys[]","description":"An array of strings, each being the ID attribute names of the entity's relations.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/pricing.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/pricing.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="softDeletePrices"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;void \\| Record&#60;string, string[]&#62;&#62;","optional":false,"defaultValue":"","description":"An object that includes the IDs of related records that were also soft deleted, such as the ID of the associated price rules.\nThe object's keys are the ID attribute names of the price entity's relations, such as `price_rule_id`, and its value is an array of strings, each being the ID of a record associated\nwith the price through this relation, such as the IDs of associated price rule.\n\nIf there are no related records, the promise resolves to `void`.","expandable":false,"children":[{"name":"void \\| Record&#60;string, string[]&#62;","type":"`void` \\| `Record<string, string[]>`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} sectionTitle="softDeletePrices"/>
@@ -0,0 +1,59 @@
---
displayed_sidebar: pricingReference
slug: /references/pricing/update
sidebar_label: update
---
import { TypeList } from "docs-ui"
# update - Pricing Module Reference
This documentation provides a reference to the `update` method. This belongs to the Pricing Module.
## update(id, data, sharedContext?): Promise&#60;[PriceSetDTO](../../../interfaces/pricing.PriceSetDTO/page.mdx)&#62;
This method is used to update a price set.
### Example
```ts
const priceSet = await pricingModuleService.update(
"pset_123",
{
rules: [{ rule_attribute: "region_id" }],
}
)
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the price set to be updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"[UpdatePriceSetDTO](../../../interfaces/pricing.UpdatePriceSetDTO/page.mdx)","description":"The attributes of the price set to be updated","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"rules","type":"`object`[]","description":"The rules to associate with the price set.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"rule_attribute","type":"`string`","description":"the value of the rule's `rule_attribute` attribute.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"prices","type":"[CreatePricesDTO](../../../interfaces/pricing.CreatePricesDTO/page.mdx)[]","description":"The prices to create and add to this price set.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"currency_code","type":"`string`","description":"The currency code of this money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../../types/pricing.BigNumberInput/page.mdx)","description":"The amount of this money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the money amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"`null` \\| [BigNumberInput](../../../types/pricing.BigNumberInput/page.mdx)","description":"The minimum quantity required to be purchased for this money amount to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"`null` \\| [BigNumberInput](../../../types/pricing.BigNumberInput/page.mdx)","description":"The maximum quantity required to be purchased for this money amount to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[CreatePriceSetPriceRules](../../../interfaces/pricing.CreatePriceSetPriceRules/page.mdx)","description":"The rules to add to the price. The object's keys are rule types' `rule_attribute` attribute, and values are the value of that rule associated with this price.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/pricing.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/pricing.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="update"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PriceSetDTO](../../../interfaces/pricing.PriceSetDTO/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The updated price set.","expandable":false,"children":[{"name":"PriceSetDTO","type":"[PriceSetDTO](../../../interfaces/pricing.PriceSetDTO/page.mdx)","optional":false,"defaultValue":"","description":"A price set's data.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the price set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"[MoneyAmountDTO](../../../interfaces/pricing.MoneyAmountDTO/page.mdx)[]","description":"The prices that belong to this price set.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"When the money\\_amount was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"When the money\\_amount was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"When the money\\_amount was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency code of this money amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../../types/pricing.BigNumberValue/page.mdx)","description":"The price of this money amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"[BigNumberValue](../../../types/pricing.BigNumberValue/page.mdx)","description":"The minimum quantity required to be purchased for this price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"[BigNumberValue](../../../types/pricing.BigNumberValue/page.mdx)","description":"The maximum quantity required to be purchased for this price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"rule_types","type":"[RuleTypeDTO](../../../interfaces/pricing.RuleTypeDTO/page.mdx)[]","description":"The rule types applied on this price set.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the rule type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The display name of the rule type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rule_attribute","type":"`string`","description":"The unique name used to later identify the rule\\_attribute. For example, it can be used in the `context` parameter of\nthe `calculatePrices` method to specify a rule for calculating the price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_priority","type":"`number`","description":"The priority of the rule type. This is useful when calculating the price of a price set, and multiple rules satisfy\nthe provided context. The higher the value, the higher the priority of the rule type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the rule type.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the rule type.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]}]} sectionTitle="update"/>
## update(selector, data, sharedContext?): Promise&#60;[PriceSetDTO](../../../interfaces/pricing.PriceSetDTO/page.mdx)[]&#62;
This method is used to update a list of price sets determined by the selector filters.
### Example
```ts
const priceSets = await pricingModuleService.update(
{
id: ["pset_123", "pset_321"],
},
{
rules: [{ rule_attribute: "region_id" }],
}
)
```
### Parameters
<TypeList types={[{"name":"selector","type":"[FilterablePriceSetProps](../../../interfaces/pricing.FilterablePriceSetProps/page.mdx)","description":"The filters that will determine which price sets will be updated.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterablePriceSetProps](../../../interfaces/pricing.FilterablePriceSetProps/page.mdx) \\| [BaseFilterable](../../../interfaces/pricing.BaseFilterable/page.mdx)&#60;[FilterablePriceSetProps](../../../interfaces/pricing.FilterablePriceSetProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterablePriceSetProps](../../../interfaces/pricing.FilterablePriceSetProps/page.mdx) \\| [BaseFilterable](../../../interfaces/pricing.BaseFilterable/page.mdx)&#60;[FilterablePriceSetProps](../../../interfaces/pricing.FilterablePriceSetProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`[]","description":"IDs to filter price sets by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"money_amounts","type":"[FilterableMoneyAmountProps](../../../interfaces/pricing.FilterableMoneyAmountProps/page.mdx)","description":"Filters to apply on a price set's associated money amounts.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableMoneyAmountProps](../../../interfaces/pricing.FilterableMoneyAmountProps/page.mdx) \\| [BaseFilterable](../../../interfaces/pricing.BaseFilterable/page.mdx)&#60;[FilterableMoneyAmountProps](../../../interfaces/pricing.FilterableMoneyAmountProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableMoneyAmountProps](../../../interfaces/pricing.FilterableMoneyAmountProps/page.mdx) \\| [BaseFilterable](../../../interfaces/pricing.BaseFilterable/page.mdx)&#60;[FilterableMoneyAmountProps](../../../interfaces/pricing.FilterableMoneyAmountProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`[]","description":"IDs to filter money amounts by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string` \\| `string`[]","description":"Currency codes to filter money amounts by.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"data","type":"[UpdatePriceSetDTO](../../../interfaces/pricing.UpdatePriceSetDTO/page.mdx)","description":"The attributes to be updated on the selected price sets","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"rules","type":"`object`[]","description":"The rules to associate with the price set.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"rule_attribute","type":"`string`","description":"the value of the rule's `rule_attribute` attribute.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"prices","type":"[CreatePricesDTO](../../../interfaces/pricing.CreatePricesDTO/page.mdx)[]","description":"The prices to create and add to this price set.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"currency_code","type":"`string`","description":"The currency code of this money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../../types/pricing.BigNumberInput/page.mdx)","description":"The amount of this money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the money amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"`null` \\| [BigNumberInput](../../../types/pricing.BigNumberInput/page.mdx)","description":"The minimum quantity required to be purchased for this money amount to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"`null` \\| [BigNumberInput](../../../types/pricing.BigNumberInput/page.mdx)","description":"The maximum quantity required to be purchased for this money amount to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[CreatePriceSetPriceRules](../../../interfaces/pricing.CreatePriceSetPriceRules/page.mdx)","description":"The rules to aLine truncated
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PriceSetDTO](../../../interfaces/pricing.PriceSetDTO/page.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The updated price sets.","expandable":false,"children":[{"name":"PriceSetDTO[]","type":"[PriceSetDTO](../../../interfaces/pricing.PriceSetDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"PriceSetDTO","type":"`object`","description":"A price set's data.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="update"/>
@@ -0,0 +1,40 @@
---
displayed_sidebar: pricingReference
slug: /references/pricing/updatePriceListPrices
sidebar_label: updatePriceListPrices
---
import { TypeList } from "docs-ui"
# updatePriceListPrices - Pricing Module Reference
This documentation provides a reference to the `updatePriceListPrices` method. This belongs to the Pricing Module.
This method updates existing price list's prices.
## Example
```ts
const priceLists =
await pricingModuleService.updatePriceListPrices([
{
price_list_id: "plist_123",
prices: [
{
id: "price_123",
currency_code: "usd",
amount: 500,
price_set_id: "pset_123",
},
],
},
])
```
## Parameters
<TypeList types={[{"name":"data","type":"[UpdatePriceListPricesDTO](../../../interfaces/pricing.UpdatePriceListPricesDTO/page.mdx)[]","description":"The attributes to update in a price list's prices. The price list's ID is specified\nin the `price_list_id` field.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"price_list_id","type":"`string`","description":"The ID of the price list to add prices to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"[UpdatePriceListPriceDTO](../../../interfaces/pricing.UpdatePriceListPriceDTO/page.mdx)[]","description":"The prices to add.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the money amount to update.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_set_id","type":"`string`","description":"The ID of the associated price set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`null` \\| `string`","description":"The code of the currency to associate with the money amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../../types/pricing.BigNumberInput/page.mdx)","description":"The price of this money amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"[BigNumberInput](../../../types/pricing.BigNumberInput/page.mdx)","description":"The minimum quantity required to be purchased for this money amount to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"[BigNumberInput](../../../types/pricing.BigNumberInput/page.mdx)","description":"The maximum quantity required to be purchased for this money amount to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[CreatePriceSetPriceRules](../../../interfaces/pricing.CreatePriceSetPriceRules/page.mdx)","description":"The rules to add to the price. The object's keys are rule types' `rule_attribute` attribute, and values are the value of that rule associated with this price.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/pricing.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/pricing.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="updatePriceListPrices"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PriceDTO](../../../interfaces/pricing.PriceDTO/page.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The updated price list's prices.","expandable":false,"children":[{"name":"PriceDTO[]","type":"[PriceDTO](../../../interfaces/pricing.PriceDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"PriceDTO","type":"`object`","description":"A price's data.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="updatePriceListPrices"/>
@@ -0,0 +1,33 @@
---
displayed_sidebar: pricingReference
slug: /references/pricing/updatePriceListRules
sidebar_label: updatePriceListRules
---
import { TypeList } from "docs-ui"
# updatePriceListRules - Pricing Module Reference
This documentation provides a reference to the `updatePriceListRules` method. This belongs to the Pricing Module.
This method is used to update price list rules.
## Example
```ts
const priceListRules =
await pricingModuleService.updatePriceListRules([
{
id: "plrule_123",
rule_type_id: "rul-typ_123",
},
])
```
## Parameters
<TypeList types={[{"name":"data","type":"[UpdatePriceListRuleDTO](../../../interfaces/pricing.UpdatePriceListRuleDTO/page.mdx)[]","description":"The attributes to update for each price list rule. The price list rule is identified by the `id` property.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the price list rule to update.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_list_id","type":"`string`","description":"The ID of a price list to be associated with the price list rule.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rule_type_id","type":"`string`","description":"The ID of a rule type to be associated with the price list rule.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"price_list","type":"`string`","description":"The ID of a price list to be associated with the price list rule.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rule_type","type":"`string`","description":"The ID of a rule type or the details of an existing rule type to be associated with the price list rule.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/pricing.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/pricing.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="updatePriceListRules"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PriceListRuleDTO](../../../interfaces/pricing.PriceListRuleDTO/page.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The updated price list rules.","expandable":false,"children":[{"name":"PriceListRuleDTO[]","type":"[PriceListRuleDTO](../../../interfaces/pricing.PriceListRuleDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"PriceListRuleDTO","type":"`object`","description":"The price list rule's details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="updatePriceListRules"/>
@@ -0,0 +1,37 @@
---
displayed_sidebar: pricingReference
slug: /references/pricing/updatePriceLists
sidebar_label: updatePriceLists
---
import { TypeList } from "docs-ui"
# updatePriceLists - Pricing Module Reference
This documentation provides a reference to the `updatePriceLists` method. This belongs to the Pricing Module.
This method is used to update price lists.
## Example
```ts
const priceLists =
await pricingModuleService.updatePriceLists([
{
id: "plist_123",
title: "Sale 1",
},
{
id: "plist_321",
description: "Winter sale",
},
])
```
## Parameters
<TypeList types={[{"name":"data","type":"[UpdatePriceListDTO](../../../interfaces/pricing.UpdatePriceListDTO/page.mdx)[]","description":"The attributes to update in each price list. The price list is identifed by the `id` field.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the price list to update.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The price list's title.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The price list's description.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"starts_at","type":"`null` \\| `string`","description":"The price list is enabled starting from this date.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"ends_at","type":"`null` \\| `string`","description":"The price list expires after this date.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[PriceListStatus](../../../enums/pricing.PriceListStatus/page.mdx)","description":"The price list's status.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"ACTIVE","type":"`\"active\"`","description":"The price list is enabled and its prices can be used.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"DRAFT","type":"`\"draft\"`","description":"The price list is disabled, meaning its prices can't be used yet.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"rules_count","type":"`number`","description":"The number of rules associated with the price list.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[CreatePriceListRules](../../../interfaces/pricing.CreatePriceListRules/page.mdx)","description":"The rules to be created and associated with the price list.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/pricing.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/pricing.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="updatePriceLists"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PriceListDTO](../../../interfaces/pricing.PriceListDTO/page.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The updated price lists.","expandable":false,"children":[{"name":"PriceListDTO[]","type":"[PriceListDTO](../../../interfaces/pricing.PriceListDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"PriceListDTO","type":"`object`","description":"A price list's details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="updatePriceLists"/>
@@ -0,0 +1,33 @@
---
displayed_sidebar: pricingReference
slug: /references/pricing/updatePriceRules
sidebar_label: updatePriceRules
---
import { TypeList } from "docs-ui"
# updatePriceRules - Pricing Module Reference
This documentation provides a reference to the `updatePriceRules` method. This belongs to the Pricing Module.
This method is used to update price rules, each with their provided data.
## Example
```ts
const priceRules =
await pricingModuleService.updatePriceRules([
{
id: "prule_123",
price_id: "price_123",
},
])
```
## Parameters
<TypeList types={[{"name":"data","type":"[UpdatePriceRuleDTO](../../../interfaces/pricing.UpdatePriceRuleDTO/page.mdx)[]","description":"The price rules to update, each having attributes that should be updated in a price rule.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_set_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rule_type_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The value of the price rule.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"priority","type":"`number`","description":"The priority of the price rule in comparison to other applicable price rules.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"price_id","type":"`string`","description":"The ID of the associated price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"price_list_id","type":"`string`","description":"The ID of the associated price list.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/pricing.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/pricing.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="updatePriceRules"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PriceRuleDTO](../../../interfaces/pricing.PriceRuleDTO/page.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The list of updated price rules.","expandable":false,"children":[{"name":"PriceRuleDTO[]","type":"[PriceRuleDTO](../../../interfaces/pricing.PriceRuleDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"PriceRuleDTO","type":"`object`","description":"A price rule's data.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="updatePriceRules"/>
@@ -0,0 +1,36 @@
---
displayed_sidebar: pricingReference
slug: /references/pricing/updateRuleTypes
sidebar_label: updateRuleTypes
---
import { TypeList } from "docs-ui"
# updateRuleTypes - Pricing Module Reference
This documentation provides a reference to the `updateRuleTypes` method. This belongs to the Pricing Module.
This method is used to update existing rule types with the provided data.
## Example
```ts
const ruleTypes = await pricingModuleService.updateRuleTypes([
{
id: "rul-typ_123",
name: "Region",
},
{
id: "rul-typ_321",
name: "Customer Group",
},
])
```
## Parameters
<TypeList types={[{"name":"data","type":"[UpdateRuleTypeDTO](../../../interfaces/pricing.UpdateRuleTypeDTO/page.mdx)[]","description":"The rule types to update, each having the attributes that should be updated in a rule type.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the rule type to update.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The display name of the rule type.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rule_attribute","type":"`string`","description":"The 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.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"default_priority","type":"`number`","description":"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.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/pricing.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/pricing.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="updateRuleTypes"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[RuleTypeDTO](../../../interfaces/pricing.RuleTypeDTO/page.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The list of updated rule types.","expandable":false,"children":[{"name":"RuleTypeDTO[]","type":"[RuleTypeDTO](../../../interfaces/pricing.RuleTypeDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"RuleTypeDTO","type":"`object`","description":"A rule type's data.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="updateRuleTypes"/>
@@ -0,0 +1,63 @@
---
displayed_sidebar: pricingReference
slug: /references/pricing/upsert
sidebar_label: upsert
---
import { TypeList } from "docs-ui"
# upsert - Pricing Module Reference
This documentation provides a reference to the `upsert` method. This belongs to the Pricing Module.
## upsert(data, sharedContext?): Promise&#60;[PriceSetDTO](../../../interfaces/pricing.PriceSetDTO/page.mdx)[]&#62;
This method updates existing price sets, or creates new ones if they don't exist.
### Example
```ts
const priceSets = await pricingModuleService.upsert([
{
prices: [
{
amount: 100,
currency_code: "USD",
},
],
},
{
id: "pset_123",
rules: [{ rule_attribute: "region_id" }],
},
])
```
### Parameters
<TypeList types={[{"name":"data","type":"[UpsertPriceSetDTO](../../../interfaces/pricing.UpsertPriceSetDTO/page.mdx)[]","description":"The attributes to update or create for each price set.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"A string indicating the ID of the price set to update.\nIf not provided, a price set is created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"`object`[]","description":"The rules to associate with the price set.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"rule_attribute","type":"`string`","description":"the value of the rule's `rule_attribute` attribute.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"prices","type":"[CreatePricesDTO](../../../interfaces/pricing.CreatePricesDTO/page.mdx)[]","description":"The prices to create and add to this price set.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"currency_code","type":"`string`","description":"The currency code of this money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../../types/pricing.BigNumberInput/page.mdx)","description":"The amount of this money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the money amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"`null` \\| [BigNumberInput](../../../types/pricing.BigNumberInput/page.mdx)","description":"The minimum quantity required to be purchased for this money amount to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"`null` \\| [BigNumberInput](../../../types/pricing.BigNumberInput/page.mdx)","description":"The maximum quantity required to be purchased for this money amount to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[CreatePriceSetPriceRules](../../../interfaces/pricing.CreatePriceSetPriceRules/page.mdx)","description":"The rules to add to the price. The object's keys are rule types' `rule_attribute` attribute, and values are the value of that rule associated with this price.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/pricing.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/pricing.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="upsert"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PriceSetDTO](../../../interfaces/pricing.PriceSetDTO/page.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The updated and created price sets.","expandable":false,"children":[{"name":"PriceSetDTO[]","type":"[PriceSetDTO](../../../interfaces/pricing.PriceSetDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"PriceSetDTO","type":"`object`","description":"A price set's data.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="upsert"/>
## upsert(data, sharedContext?): Promise&#60;[PriceSetDTO](../../../interfaces/pricing.PriceSetDTO/page.mdx)&#62;
This method updates the price set if it exists, or creates a new ones if it doesn't.
### Example
```ts
const priceSet = await pricingModuleService.upsert({
id: "pset_123",
rules: [{ rule_attribute: "region_id" }],
})
```
### Parameters
<TypeList types={[{"name":"data","type":"[UpsertPriceSetDTO](../../../interfaces/pricing.UpsertPriceSetDTO/page.mdx)","description":"The attributes to update or create for the new price set.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"A string indicating the ID of the price set to update.\nIf not provided, a price set is created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"`object`[]","description":"The rules to associate with the price set.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"rule_attribute","type":"`string`","description":"the value of the rule's `rule_attribute` attribute.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"prices","type":"[CreatePricesDTO](../../../interfaces/pricing.CreatePricesDTO/page.mdx)[]","description":"The prices to create and add to this price set.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"currency_code","type":"`string`","description":"The currency code of this money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../../types/pricing.BigNumberInput/page.mdx)","description":"The amount of this money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the money amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"`null` \\| [BigNumberInput](../../../types/pricing.BigNumberInput/page.mdx)","description":"The minimum quantity required to be purchased for this money amount to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"`null` \\| [BigNumberInput](../../../types/pricing.BigNumberInput/page.mdx)","description":"The maximum quantity required to be purchased for this money amount to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[CreatePriceSetPriceRules](../../../interfaces/pricing.CreatePriceSetPriceRules/page.mdx)","description":"The rules to add to the price. The object's keys are rule types' `rule_attribute` attribute, and values are the value of that rule associated with this price.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/pricing.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/pricing.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="upsert"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PriceSetDTO](../../../interfaces/pricing.PriceSetDTO/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The updated or created price set.","expandable":false,"children":[{"name":"PriceSetDTO","type":"[PriceSetDTO](../../../interfaces/pricing.PriceSetDTO/page.mdx)","optional":false,"defaultValue":"","description":"A price set's data.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the price set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"[MoneyAmountDTO](../../../interfaces/pricing.MoneyAmountDTO/page.mdx)[]","description":"The prices that belong to this price set.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"When the money\\_amount was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"When the money\\_amount was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"When the money\\_amount was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency code of this money amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../../types/pricing.BigNumberValue/page.mdx)","description":"The price of this money amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"[BigNumberValue](../../../types/pricing.BigNumberValue/page.mdx)","description":"The minimum quantity required to be purchased for this price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"[BigNumberValue](../../../types/pricing.BigNumberValue/page.mdx)","description":"The maximum quantity required to be purchased for this price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"rule_types","type":"[RuleTypeDTO](../../../interfaces/pricing.RuleTypeDTO/page.mdx)[]","description":"The rule types applied on this price set.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the rule type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The display name of the rule type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rule_attribute","type":"`string`","description":"The unique name used to later identify the rule\\_attribute. For example, it can be used in the `context` parameter of\nthe `calculatePrices` method to specify a rule for calculating the price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_priority","type":"`number`","description":"The priority of the rule type. This is useful when calculating the price of a price set, and multiple rules satisfy\nthe provided context. The higher the value, the higher the priority of the rule type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the rule type.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the rule type.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]}]} sectionTitle="upsert"/>
@@ -0,0 +1,23 @@
---
displayed_sidebar: pricingReference
---
import { TypeList } from "docs-ui"
# PriceListStatus
The price list's status.
## ACTIVE
**ACTIVE** = `"active"`
The price list is enabled and its prices can be used.
___
## DRAFT
**DRAFT** = `"draft"`
The price list is disabled, meaning its prices can't be used yet.
@@ -0,0 +1,23 @@
---
displayed_sidebar: pricingReference
---
import { TypeList } from "docs-ui"
# PriceListType
The price list's type.
## SALE
**SALE** = `"sale"`
The price list's prices are used for a sale.
___
## OVERRIDE
**OVERRIDE** = `"override"`
The price list's prices override original prices. This affects the calculated price of associated price sets.
@@ -0,0 +1,11 @@
---
displayed_sidebar: pricingReference
---
import { TypeList } from "docs-ui"
# AddPriceListPricesDTO
The prices to be added to a price list.
<TypeList types={[{"name":"price_list_id","type":"`string`","description":"The ID of the price list to add prices to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"[CreatePriceListPriceDTO](../pricing.CreatePriceListPriceDTO/page.mdx)[]","description":"The prices to add.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"currency_code","type":"`string`","description":"The currency code of this money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../types/pricing.BigNumberInput/page.mdx)","description":"The amount of this money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_set_id","type":"`string`","description":"The ID of the associated price set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the money amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"`null` \\| [BigNumberInput](../../types/pricing.BigNumberInput/page.mdx)","description":"The minimum quantity required to be purchased for this money amount to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"`null` \\| [BigNumberInput](../../types/pricing.BigNumberInput/page.mdx)","description":"The maximum quantity required to be purchased for this money amount to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[CreatePriceSetPriceRules](../pricing.CreatePriceSetPriceRules/page.mdx)","description":"The rules to add to the price. The object's keys are rule types' `rule_attribute` attribute, and values are the value of that rule associated with this price.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="AddPriceListPricesDTO"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: pricingReference
---
import { TypeList } from "docs-ui"
# AddPricesDTO
The prices to add to a price set.
<TypeList types={[{"name":"priceSetId","type":"`string`","description":"The ID of the price set to add prices to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"[CreatePricesDTO](../pricing.CreatePricesDTO/page.mdx)[]","description":"The prices to add to the price set.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"currency_code","type":"`string`","description":"The currency code of this money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../types/pricing.BigNumberInput/page.mdx)","description":"The amount of this money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the money amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"`null` \\| [BigNumberInput](../../types/pricing.BigNumberInput/page.mdx)","description":"The minimum quantity required to be purchased for this money amount to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"`null` \\| [BigNumberInput](../../types/pricing.BigNumberInput/page.mdx)","description":"The maximum quantity required to be purchased for this money amount to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[CreatePriceSetPriceRules](../pricing.CreatePriceSetPriceRules/page.mdx)","description":"The rules to add to the price. The object's keys are rule types' `rule_attribute` attribute, and values are the value of that rule associated with this price.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="AddPricesDTO"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: pricingReference
---
import { TypeList } from "docs-ui"
# AddRulesDTO
The rules to add to a price set.
<TypeList types={[{"name":"priceSetId","type":"`string`","description":"The ID of the price set to add the rules to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"`object`[]","description":"The rules to add to a price set.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"attribute","type":"`string`","description":"The value of the rule's `rule_attribute` attribute.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="AddRulesDTO"/>
@@ -0,0 +1,15 @@
---
displayed_sidebar: pricingReference
---
import { TypeList } from "docs-ui"
# BaseFilterable
An object used to allow specifying flexible queries with and/or conditions.
## Type parameters
<TypeList types={[{"name":"T","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="BaseFilterable"/>
<TypeList types={[{"name":"$and","type":"([BaseFilterable](page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="BaseFilterable"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: pricingReference
---
import { TypeList } from "docs-ui"
# CalculatedPriceSet
The calculated price for a specific price set and context.
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the price set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"calculated_amount","type":"`null` \\| [BigNumberValue](../../types/pricing.BigNumberValue/page.mdx)","description":"The amount of the calculated price, or `null` if there isn't a calculated price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_amount","type":"`null` \\| [BigNumberValue](../../types/pricing.BigNumberValue/page.mdx)","description":"The amount of the original price, or `null` if there isn't a calculated price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`null` \\| `string`","description":"The currency code of the calculated price, or null if there isn't a calculated price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"calculated_price.id","type":"`null` \\| `string`","description":"The ID of the price selected as the calculated price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"calculated_price.price_list_id","type":"`null` \\| `string`","description":"The ID of the associated price list, if any.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"calculated_price.price_list_type","type":"`null` \\| `string`","description":"The type of the associated price list, if any.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"calculated_price.min_quantity","type":"`null` \\| [BigNumberValue](../../types/pricing.BigNumberValue/page.mdx)","description":"The `min_quantity` field defined on a price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"calculated_price.max_quantity","type":"`null` \\| [BigNumberValue](../../types/pricing.BigNumberValue/page.mdx)","description":"The `max_quantity` field defined on a price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_price.id","type":"`null` \\| `string`","description":"The ID of the price selected as the original price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_price.price_list_id","type":"`null` \\| `string`","description":"The ID of the associated price list, if any.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_price.price_list_type","type":"`null` \\| `string`","description":"The type of the associated price list, if any.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_price.min_quantity","type":"`null` \\| [BigNumberValue](../../types/pricing.BigNumberValue/page.mdx)","description":"The `min_quantity` field defined on a price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_price.max_quantity","type":"`null` \\| [BigNumberValue](../../types/pricing.BigNumberValue/page.mdx)","description":"The `max_quantity` field defined on a price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_calculated_price_price_list","type":"`boolean`","description":"Whether the calculated price is associated with a price list. During the calculation process, if no valid price list is found,\nthe calculated price is set to the original price, which doesn't belong to a price list. In that case, the value of this property is `false`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_original_price_price_list","type":"`boolean`","description":"Whether the original price is associated with a price list. During the calculation process, if the price list of the calculated price is of type override,\nthe original price will be the same as the calculated price. In that case, the value of this property is `true`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"calculated_price","type":"`object`","description":"The details of the calculated price.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`null` \\| `string`","description":"The ID of the price selected as the calculated price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_list_id","type":"`null` \\| `string`","description":"The ID of the associated price list, if any.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_list_type","type":"`null` \\| `string`","description":"The type of the associated price list, if any.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"`null` \\| [BigNumberValue](../../types/pricing.BigNumberValue/page.mdx)","description":"The `min_quantity` field defined on a price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"`null` \\| [BigNumberValue](../../types/pricing.BigNumberValue/Line truncated
@@ -0,0 +1,15 @@
---
displayed_sidebar: pricingReference
---
import { TypeList } from "docs-ui"
# Context
A context used to share resources, such as transaction manager, between the application and the module.
## Type parameters
<TypeList types={[{"name":"TManager","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="Context"/>
<TypeList types={[{"name":"__type","type":"`\"MedusaContext\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"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`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../pricing.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="Context"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: pricingReference
---
import { TypeList } from "docs-ui"
# CreateMoneyAmountDTO
The money amount to create.
<TypeList types={[{"name":"currency_code","type":"`string`","description":"The currency code of this money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../types/pricing.BigNumberInput/page.mdx)","description":"The amount of this money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the money amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"`null` \\| [BigNumberInput](../../types/pricing.BigNumberInput/page.mdx)","description":"The minimum quantity required to be purchased for this money amount to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"`null` \\| [BigNumberInput](../../types/pricing.BigNumberInput/page.mdx)","description":"The maximum quantity required to be purchased for this money amount to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="CreateMoneyAmountDTO"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: pricingReference
---
import { TypeList } from "docs-ui"
# CreatePriceListDTO
The price list to create.
<TypeList types={[{"name":"title","type":"`string`","description":"The price list's title.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The price list's description.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"starts_at","type":"`null` \\| `string`","description":"The price list is enabled starting from this date.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"ends_at","type":"`null` \\| `string`","description":"The price list expires after this date.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[PriceListStatus](../../enums/pricing.PriceListStatus/page.mdx)","description":"The price list's status.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"ACTIVE","type":"`\"active\"`","description":"The price list is enabled and its prices can be used.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"DRAFT","type":"`\"draft\"`","description":"The price list is disabled, meaning its prices can't be used yet.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"type","type":"[PriceListType](../../enums/pricing.PriceListType/page.mdx)","description":"The price list's type.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"SALE","type":"`\"sale\"`","description":"The price list's prices are used for a sale.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"OVERRIDE","type":"`\"override\"`","description":"The price list's prices override original prices. This affects the calculated price of associated price sets.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"rules_count","type":"`number`","description":"The number of rules associated with the price list.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[CreatePriceListRules](../pricing.CreatePriceListRules/page.mdx)","description":"The rules to be created and associated with the price list.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"[CreatePriceListPriceDTO](../pricing.CreatePriceListPriceDTO/page.mdx)[]","description":"The prices associated with the price list.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"currency_code","type":"`string`","description":"The currency code of this money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../types/pricing.BigNumberInput/page.mdx)","description":"The amount of this money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_set_id","type":"`string`","description":"The ID of the associated price set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the money amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"`null` \\| [BigNumberInput](../../types/pricing.BigNumberInput/page.mdx)","description":"The minimum quantity required to be purchased for this money amount to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"`null` \\| [BigNumberInput](../../types/pricing.BigNumberInput/page.mdx)","description":"The maximum quantity required to be purchased for this money amount to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[CreatePriceSetPriceRules](../pricing.CreatePriceSetPriceRules/page.mdx)","description":"The rules to add to the price. The object's keys are rule types' `rule_attribute` attribute, and values are the value of that rule associated with this price.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="CreatePriceListDTO"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: pricingReference
---
import { TypeList } from "docs-ui"
# CreatePriceListPriceDTO
The prices associated with a price list.
<TypeList types={[{"name":"currency_code","type":"`string`","description":"The currency code of this money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../types/pricing.BigNumberInput/page.mdx)","description":"The amount of this money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_set_id","type":"`string`","description":"The ID of the associated price set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the money amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"`null` \\| [BigNumberInput](../../types/pricing.BigNumberInput/page.mdx)","description":"The minimum quantity required to be purchased for this money amount to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"`null` \\| [BigNumberInput](../../types/pricing.BigNumberInput/page.mdx)","description":"The maximum quantity required to be purchased for this money amount to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[CreatePriceSetPriceRules](../pricing.CreatePriceSetPriceRules/page.mdx)","description":"The rules to add to the price. The object's keys are rule types' `rule_attribute` attribute, and values are the value of that rule associated with this price.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="CreatePriceListPriceDTO"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: pricingReference
---
import { TypeList } from "docs-ui"
# CreatePriceListRuleDTO
The price list rule to create.
<TypeList types={[{"name":"rule_type_id","type":"`string`","description":"The ID of a rule type to be associated with the price list rule.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rule_type","type":"`string` \\| [RuleTypeDTO](../pricing.RuleTypeDTO/page.mdx)","description":"The ID of a rule type or the details of an existing rule type to be associated with the price list rule.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"price_list_id","type":"`string`","description":"The ID of a price list to be associated with the price list rule.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"price_list","type":"`string` \\| [PriceListDTO](../pricing.PriceListDTO/page.mdx)","description":"The ID of a price list or the details of an existing price list to be associated with the price list rule.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="CreatePriceListRuleDTO"/>
@@ -0,0 +1,10 @@
---
displayed_sidebar: pricingReference
---
import { TypeList } from "docs-ui"
# CreatePriceListRules
The price list's rules to be set. Each key of the object is a rule type's `rule_attribute`, and its value
is the values of the rule.
@@ -0,0 +1,11 @@
---
displayed_sidebar: pricingReference
---
import { TypeList } from "docs-ui"
# CreatePriceRuleDTO
A price rule to create.
<TypeList types={[{"name":"value","type":"`string`","description":"The value of the price rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_set_id","type":"`string`","description":"The ID of the associated price set.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rule_type_id","type":"`string`","description":"The ID of the associated rule type.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"priority","type":"`number`","description":"The priority of the price rule in comparison to other applicable price rules.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"price_id","type":"`string`","description":"The ID of the associated price.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="CreatePriceRuleDTO"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: pricingReference
---
import { TypeList } from "docs-ui"
# CreatePriceSetDTO
A price set to create.
<TypeList types={[{"name":"rules","type":"`object`[]","description":"The rules to associate with the price set.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"rule_attribute","type":"`string`","description":"the value of the rule's `rule_attribute` attribute.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"prices","type":"[CreatePricesDTO](../pricing.CreatePricesDTO/page.mdx)[]","description":"The prices to create and add to this price set.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"currency_code","type":"`string`","description":"The currency code of this money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../types/pricing.BigNumberInput/page.mdx)","description":"The amount of this money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the money amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"`null` \\| [BigNumberInput](../../types/pricing.BigNumberInput/page.mdx)","description":"The minimum quantity required to be purchased for this money amount to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"`null` \\| [BigNumberInput](../../types/pricing.BigNumberInput/page.mdx)","description":"The maximum quantity required to be purchased for this money amount to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[CreatePriceSetPriceRules](../pricing.CreatePriceSetPriceRules/page.mdx)","description":"The rules to add to the price. The object's keys are rule types' `rule_attribute` attribute, and values are the value of that rule associated with this price.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="CreatePriceSetDTO"/>
@@ -0,0 +1,12 @@
---
displayed_sidebar: pricingReference
---
import { TypeList } from "docs-ui"
# CreatePriceSetPriceRules
The price rules to be set for each price in the price set.
Each key of the object is a rule type's `rule_attribute`, and its value
is the values of the rule.
@@ -0,0 +1,11 @@
---
displayed_sidebar: pricingReference
---
import { TypeList } from "docs-ui"
# CreatePricesDTO
The prices to create part of a price set.
<TypeList types={[{"name":"currency_code","type":"`string`","description":"The currency code of this money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../types/pricing.BigNumberInput/page.mdx)","description":"The amount of this money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the money amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"`null` \\| [BigNumberInput](../../types/pricing.BigNumberInput/page.mdx)","description":"The minimum quantity required to be purchased for this money amount to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"`null` \\| [BigNumberInput](../../types/pricing.BigNumberInput/page.mdx)","description":"The maximum quantity required to be purchased for this money amount to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[CreatePriceSetPriceRules](../pricing.CreatePriceSetPriceRules/page.mdx)","description":"The rules to add to the price. The object's keys are rule types' `rule_attribute` attribute, and values are the value of that rule associated with this price.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="CreatePricesDTO"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: pricingReference
---
import { TypeList } from "docs-ui"
# CreateRuleTypeDTO
The rule type to create.
<TypeList types={[{"name":"name","type":"`string`","description":"The display name of the rule type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rule_attribute","type":"`string`","description":"The unique name used to later identify the rule\\_attribute. For example, it can be used in the `context` parameter of the `calculatePrices`\nmethod to specify a rule for calculating the price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the rule type.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"default_priority","type":"`number`","description":"The priority of the rule type. This is useful when calculating the price of a price set, and multiple rules satisfy the provided context.\nThe higher the value, the higher the priority of the rule type.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="CreateRuleTypeDTO"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: pricingReference
---
import { TypeList } from "docs-ui"
# FilterableMoneyAmountProps
Filters to apply on a money amount.
<TypeList types={[{"name":"$and","type":"([FilterableMoneyAmountProps](page.mdx) \\| [BaseFilterable](../pricing.BaseFilterable/page.mdx)&#60;[FilterableMoneyAmountProps](page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableMoneyAmountProps](page.mdx) \\| [BaseFilterable](../pricing.BaseFilterable/page.mdx)&#60;[FilterableMoneyAmountProps](page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`[]","description":"IDs to filter money amounts by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string` \\| `string`[]","description":"Currency codes to filter money amounts by.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="FilterableMoneyAmountProps"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: pricingReference
---
import { TypeList } from "docs-ui"
# FilterablePriceListProps
Filters to apply on price lists.
<TypeList types={[{"name":"$and","type":"([FilterablePriceListProps](page.mdx) \\| [BaseFilterable](../pricing.BaseFilterable/page.mdx)&#60;[FilterablePriceListProps](page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterablePriceListProps](page.mdx) \\| [BaseFilterable](../pricing.BaseFilterable/page.mdx)&#60;[FilterablePriceListProps](page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`[]","description":"The IDs to filter price lists by","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"starts_at","type":"`string`[]","description":"The start dates to filter price lists by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"ends_at","type":"`string`[]","description":"The end dates to filter price lists by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[PriceListStatus](../../enums/pricing.PriceListStatus/page.mdx)[]","description":"The statuses to filter price lists by.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"ACTIVE","type":"`\"active\"`","description":"The price list is enabled and its prices can be used.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"DRAFT","type":"`\"draft\"`","description":"The price list is disabled, meaning its prices can't be used yet.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"rules_count","type":"`number`[]","description":"The number of rules to filter price lists by.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="FilterablePriceListProps"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: pricingReference
---
import { TypeList } from "docs-ui"
# FilterablePriceListRuleProps
Filters to apply on price list rules.
<TypeList types={[{"name":"$and","type":"([FilterablePriceListRuleProps](page.mdx) \\| [BaseFilterable](../pricing.BaseFilterable/page.mdx)&#60;[FilterablePriceListRuleProps](page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterablePriceListRuleProps](page.mdx) \\| [BaseFilterable](../pricing.BaseFilterable/page.mdx)&#60;[FilterablePriceListRuleProps](page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`[]","description":"The IDs to filter price list rules by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`[]","description":"The values to filter price list rules by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rule_type","type":"`string`[]","description":"Filter price list rules by the ID of their associated rule types.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"price_list_id","type":"`string`[]","description":"Filter price list rules by the ID of their associated price lists.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="FilterablePriceListRuleProps"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: pricingReference
---
import { TypeList } from "docs-ui"
# FilterablePriceProps
Filters to apply on prices.
<TypeList types={[{"name":"$and","type":"([FilterablePriceProps](page.mdx) \\| [BaseFilterable](../pricing.BaseFilterable/page.mdx)&#60;[FilterablePriceProps](page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterablePriceProps](page.mdx) \\| [BaseFilterable](../pricing.BaseFilterable/page.mdx)&#60;[FilterablePriceProps](page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`[]","description":"The IDs to filter the prices by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string` \\| `string`[]","description":"Currency codes to filter price by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"price_set_id","type":"`string`[]","description":"The IDs to filter the price's associated price set.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"price_list_id","type":"`string`[]","description":"The IDs to filter the price's associated price list.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="FilterablePriceProps"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: pricingReference
---
import { TypeList } from "docs-ui"
# FilterablePriceRuleProps
Filters to apply on price rules.
<TypeList types={[{"name":"$and","type":"([FilterablePriceRuleProps](page.mdx) \\| [BaseFilterable](../pricing.BaseFilterable/page.mdx)&#60;[FilterablePriceRuleProps](page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterablePriceRuleProps](page.mdx) \\| [BaseFilterable](../pricing.BaseFilterable/page.mdx)&#60;[FilterablePriceRuleProps](page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`[]","description":"The IDs to filter price rules by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`[]","description":"The names to filter price rules by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"price_set_id","type":"`string`[]","description":"The IDs to filter the price rule's associated price set.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rule_type_id","type":"`string`[]","description":"The IDs to filter the price rule's associated rule type.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="FilterablePriceRuleProps"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: pricingReference
---
import { TypeList } from "docs-ui"
# FilterablePriceSetProps
Filters to apply on price sets.
<TypeList types={[{"name":"$and","type":"([FilterablePriceSetProps](page.mdx) \\| [BaseFilterable](../pricing.BaseFilterable/page.mdx)&#60;[FilterablePriceSetProps](page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterablePriceSetProps](page.mdx) \\| [BaseFilterable](../pricing.BaseFilterable/page.mdx)&#60;[FilterablePriceSetProps](page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`[]","description":"IDs to filter price sets by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"money_amounts","type":"[FilterableMoneyAmountProps](../pricing.FilterableMoneyAmountProps/page.mdx)","description":"Filters to apply on a price set's associated money amounts.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableMoneyAmountProps](../pricing.FilterableMoneyAmountProps/page.mdx) \\| [BaseFilterable](../pricing.BaseFilterable/page.mdx)&#60;[FilterableMoneyAmountProps](../pricing.FilterableMoneyAmountProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableMoneyAmountProps](../pricing.FilterableMoneyAmountProps/page.mdx) \\| [BaseFilterable](../pricing.BaseFilterable/page.mdx)&#60;[FilterableMoneyAmountProps](../pricing.FilterableMoneyAmountProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`[]","description":"IDs to filter money amounts by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string` \\| `string`[]","description":"Currency codes to filter money amounts by.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="FilterablePriceSetProps"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: pricingReference
---
import { TypeList } from "docs-ui"
# FilterableRuleTypeProps
Filters to apply on rule types.
<TypeList types={[{"name":"$and","type":"([FilterableRuleTypeProps](page.mdx) \\| [BaseFilterable](../pricing.BaseFilterable/page.mdx)&#60;[FilterableRuleTypeProps](page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableRuleTypeProps](page.mdx) \\| [BaseFilterable](../pricing.BaseFilterable/page.mdx)&#60;[FilterableRuleTypeProps](page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`[]","description":"The IDs to filter rule types by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`[]","description":"The names to filter rule types by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rule_attribute","type":"`string`[]","description":"The rule attributes to filter rule types by.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="FilterableRuleTypeProps"/>
@@ -0,0 +1,16 @@
---
displayed_sidebar: pricingReference
---
import { TypeList } from "docs-ui"
# 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
<TypeList types={[{"name":"Entity","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="FindConfig"/>
<TypeList types={[{"name":"select","type":"(`string` \\| keyof Entity)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`object`","description":"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`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"filters","type":"`Record<string, any>`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="FindConfig"/>
@@ -0,0 +1,14 @@
---
displayed_sidebar: pricingReference
---
import { TypeList } from "docs-ui"
# IMessageAggregator
## Methods
- [save](../../IMessageAggregator/methods/pricing.IMessageAggregator.save/page.mdx)
- [getMessages](../../IMessageAggregator/methods/pricing.IMessageAggregator.getMessages/page.mdx)
- [clearMessages](../../IMessageAggregator/methods/pricing.IMessageAggregator.clearMessages/page.mdx)
- [saveRawMessageData](../../IMessageAggregator/methods/pricing.IMessageAggregator.saveRawMessageData/page.mdx)
@@ -0,0 +1,7 @@
---
displayed_sidebar: pricingReference
---
import { TypeList } from "docs-ui"
# IModuleService
@@ -0,0 +1,61 @@
---
displayed_sidebar: pricingReference
slug: /references/pricing
---
import { TypeList } from "docs-ui"
# 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.
The main service interface for the Pricing Module.
## Methods
- [calculatePrices](../../IPricingModuleService/methods/pricing.IPricingModuleService.calculatePrices/page.mdx)
- [retrieve](../../IPricingModuleService/methods/pricing.IPricingModuleService.retrieve/page.mdx)
- [list](../../IPricingModuleService/methods/pricing.IPricingModuleService.list/page.mdx)
- [listAndCount](../../IPricingModuleService/methods/pricing.IPricingModuleService.listAndCount/page.mdx)
- [create](../../IPricingModuleService/methods/pricing.IPricingModuleService.create/page.mdx)
- [upsert](../../IPricingModuleService/methods/pricing.IPricingModuleService.upsert/page.mdx)
- [update](../../IPricingModuleService/methods/pricing.IPricingModuleService.update/page.mdx)
- [removeRules](../../IPricingModuleService/methods/pricing.IPricingModuleService.removeRules/page.mdx)
- [delete](../../IPricingModuleService/methods/pricing.IPricingModuleService.delete/page.mdx)
- [addPrices](../../IPricingModuleService/methods/pricing.IPricingModuleService.addPrices/page.mdx)
- [addRules](../../IPricingModuleService/methods/pricing.IPricingModuleService.addRules/page.mdx)
- [retrieveRuleType](../../IPricingModuleService/methods/pricing.IPricingModuleService.retrieveRuleType/page.mdx)
- [listRuleTypes](../../IPricingModuleService/methods/pricing.IPricingModuleService.listRuleTypes/page.mdx)
- [listAndCountRuleTypes](../../IPricingModuleService/methods/pricing.IPricingModuleService.listAndCountRuleTypes/page.mdx)
- [createRuleTypes](../../IPricingModuleService/methods/pricing.IPricingModuleService.createRuleTypes/page.mdx)
- [updateRuleTypes](../../IPricingModuleService/methods/pricing.IPricingModuleService.updateRuleTypes/page.mdx)
- [deleteRuleTypes](../../IPricingModuleService/methods/pricing.IPricingModuleService.deleteRuleTypes/page.mdx)
- [listPrices](../../IPricingModuleService/methods/pricing.IPricingModuleService.listPrices/page.mdx)
- [softDeletePrices](../../IPricingModuleService/methods/pricing.IPricingModuleService.softDeletePrices/page.mdx)
- [restorePrices](../../IPricingModuleService/methods/pricing.IPricingModuleService.restorePrices/page.mdx)
- [listAndCountPrices](../../IPricingModuleService/methods/pricing.IPricingModuleService.listAndCountPrices/page.mdx)
- [retrievePriceRule](../../IPricingModuleService/methods/pricing.IPricingModuleService.retrievePriceRule/page.mdx)
- [listPriceRules](../../IPricingModuleService/methods/pricing.IPricingModuleService.listPriceRules/page.mdx)
- [listAndCountPriceRules](../../IPricingModuleService/methods/pricing.IPricingModuleService.listAndCountPriceRules/page.mdx)
- [createPriceRules](../../IPricingModuleService/methods/pricing.IPricingModuleService.createPriceRules/page.mdx)
- [updatePriceRules](../../IPricingModuleService/methods/pricing.IPricingModuleService.updatePriceRules/page.mdx)
- [deletePriceRules](../../IPricingModuleService/methods/pricing.IPricingModuleService.deletePriceRules/page.mdx)
- [retrievePriceList](../../IPricingModuleService/methods/pricing.IPricingModuleService.retrievePriceList/page.mdx)
- [listPriceLists](../../IPricingModuleService/methods/pricing.IPricingModuleService.listPriceLists/page.mdx)
- [listAndCountPriceLists](../../IPricingModuleService/methods/pricing.IPricingModuleService.listAndCountPriceLists/page.mdx)
- [createPriceLists](../../IPricingModuleService/methods/pricing.IPricingModuleService.createPriceLists/page.mdx)
- [updatePriceLists](../../IPricingModuleService/methods/pricing.IPricingModuleService.updatePriceLists/page.mdx)
- [deletePriceLists](../../IPricingModuleService/methods/pricing.IPricingModuleService.deletePriceLists/page.mdx)
- [softDeletePriceLists](../../IPricingModuleService/methods/pricing.IPricingModuleService.softDeletePriceLists/page.mdx)
- [restorePriceLists](../../IPricingModuleService/methods/pricing.IPricingModuleService.restorePriceLists/page.mdx)
- [retrievePriceListRule](../../IPricingModuleService/methods/pricing.IPricingModuleService.retrievePriceListRule/page.mdx)
- [listPriceListRules](../../IPricingModuleService/methods/pricing.IPricingModuleService.listPriceListRules/page.mdx)
- [listAndCountPriceListRules](../../IPricingModuleService/methods/pricing.IPricingModuleService.listAndCountPriceListRules/page.mdx)
- [createPriceListRules](../../IPricingModuleService/methods/pricing.IPricingModuleService.createPriceListRules/page.mdx)
- [updatePriceListRules](../../IPricingModuleService/methods/pricing.IPricingModuleService.updatePriceListRules/page.mdx)
- [deletePriceListRules](../../IPricingModuleService/methods/pricing.IPricingModuleService.deletePriceListRules/page.mdx)
- [addPriceListPrices](../../IPricingModuleService/methods/pricing.IPricingModuleService.addPriceListPrices/page.mdx)
- [updatePriceListPrices](../../IPricingModuleService/methods/pricing.IPricingModuleService.updatePriceListPrices/page.mdx)
- [setPriceListRules](../../IPricingModuleService/methods/pricing.IPricingModuleService.setPriceListRules/page.mdx)
- [removePriceListRules](../../IPricingModuleService/methods/pricing.IPricingModuleService.removePriceListRules/page.mdx)
- [removePrices](../../IPricingModuleService/methods/pricing.IPricingModuleService.removePrices/page.mdx)
@@ -0,0 +1,9 @@
---
displayed_sidebar: pricingReference
---
import { TypeList } from "docs-ui"
# JoinerServiceConfig
<TypeList types={[{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKeys","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"alias","type":"[JoinerServiceConfigAlias](../pricing.JoinerServiceConfigAlias/page.mdx) \\| [JoinerServiceConfigAlias](../pricing.JoinerServiceConfigAlias/page.mdx)[]","description":"Property name to use as entrypoint to the service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fieldAlias","type":"`Record<string, string \\| object>`","description":"alias for deeper nested relationships (e.g. &#123; 'price': 'prices.calculated\\_price\\_set.amount' &#125;)","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relationships","type":"[JoinerRelationship](../../types/pricing.JoinerRelationship/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"isInternalService","type":"`boolean`","description":"If true, the relationship is an internal service from the medusa core\nTODO: Remove when there are no more \"internal\" services","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record<string, any>`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"extends","type":"`object`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"relationship","type":"[JoinerRelationship](../../types/pricing.JoinerRelationship/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"isInternalService","type":"`boolean`","description":"If true, the relationship is an internal service from the medusa core\nTODO: Remove when there are no more \"internal\" services","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record<string, any>`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"args","type":"`Record<string, any>`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="JoinerServiceConfig"/>
@@ -0,0 +1,9 @@
---
displayed_sidebar: pricingReference
---
import { TypeList } from "docs-ui"
# JoinerServiceConfigAlias
<TypeList types={[{"name":"name","type":"`string` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record<string, any>`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="JoinerServiceConfigAlias"/>
@@ -0,0 +1,9 @@
---
displayed_sidebar: pricingReference
---
import { TypeList } from "docs-ui"
# MessageAggregatorFormat
<TypeList types={[{"name":"groupBy","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sortBy","type":"`object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="MessageAggregatorFormat"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: pricingReference
---
import { TypeList } from "docs-ui"
# MoneyAmountDTO
A money amount's data. A money amount represents a price.
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"When the money\\_amount was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"When the money\\_amount was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"When the money\\_amount was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency code of this money amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../types/pricing.BigNumberValue/page.mdx)","description":"The price of this money amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"[BigNumberValue](../../types/pricing.BigNumberValue/page.mdx)","description":"The minimum quantity required to be purchased for this price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"[BigNumberValue](../../types/pricing.BigNumberValue/page.mdx)","description":"The maximum quantity required to be purchased for this price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="MoneyAmountDTO"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: pricingReference
---
import { TypeList } from "docs-ui"
# PriceDTO
A price's data.
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of a price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"When the price was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"When the price was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"When the price was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The title of the price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency code of this price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../types/pricing.BigNumberValue/page.mdx)","description":"The price of this price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"[BigNumberValue](../../types/pricing.BigNumberValue/page.mdx)","description":"The minimum quantity required to be purchased for this price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"[BigNumberValue](../../types/pricing.BigNumberValue/page.mdx)","description":"The maximum quantity required to be purchased for this price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"price_set","type":"[PriceSetDTO](../pricing.PriceSetDTO/page.mdx)","description":"The price set associated with the price.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the price set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"[MoneyAmountDTO](../pricing.MoneyAmountDTO/page.mdx)[]","description":"The prices that belong to this price set.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"When the money\\_amount was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"When the money\\_amount was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"When the money\\_amount was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency code of this money amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../types/pricing.BigNumberValue/page.mdx)","description":"The price of this money amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"[BigNumberValue](../../types/pricing.BigNumberValue/page.mdx)","description":"The minimum quantity required to be purchased for this price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"[BigNumberValue](../../types/pricing.BigNumberValue/page.mdx)","description":"The maximum quantity required to be purchased for this price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"rule_types","type":"[RuleTypeDTO](../pricing.RuleTypeDTO/page.mdx)[]","description":"The rule types applied on this price set.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the rule type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The display name of the rule type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rule_attribute","type":"`string`","description":"The unique name used to later identify the rule\\_attribute. For example, it can be used in the `context` parameter of\nthe `calculatePrices` method to specify a rule for calculating the price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_priority","type":"`number`","description":"The priority of the rule type. This is useful when calculating the price of a price set, and multiple rules satisfy\nthe provided context. The higher the value, the higher the priority of the rule type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the rule type.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"naLine truncated
@@ -0,0 +1,11 @@
---
displayed_sidebar: pricingReference
---
import { TypeList } from "docs-ui"
# PriceListDTO
A price list's details.
<TypeList types={[{"name":"id","type":"`string`","description":"The price list's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The price list's title.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"starts_at","type":"`null` \\| `string`","description":"The price list is enabled starting from this date.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[PriceListStatus](../../enums/pricing.PriceListStatus/page.mdx)","description":"The price list's status.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"ACTIVE","type":"`\"active\"`","description":"The price list is enabled and its prices can be used.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"DRAFT","type":"`\"draft\"`","description":"The price list is disabled, meaning its prices can't be used yet.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"ends_at","type":"`null` \\| `string`","description":"The price list expires after this date.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules_count","type":"`number`","description":"The number of rules associated with this price list.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"[PriceDTO](../pricing.PriceDTO/page.mdx)[]","description":"The associated price set money amounts.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of a price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"When the price was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"When the price was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"When the price was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The title of the price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency code of this price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../types/pricing.BigNumberValue/page.mdx)","description":"The price of this price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"[BigNumberValue](../../types/pricing.BigNumberValue/page.mdx)","description":"The minimum quantity required to be purchased for this price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"[BigNumberValue](../../types/pricing.BigNumberValue/page.mdx)","description":"The maximum quantity required to be purchased for this price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"price_set","type":"[PriceSetDTO](../pricing.PriceSetDTO/page.mdx)","description":"The price set associated with the price.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the price set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"[MoneyAmountDTO](../pricing.MoneyAmountDTO/page.mdx)[]","description":"The prices that belong to this price set.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rule_types","type":"[RuleTypeDTO](../pricing.RuleTypeDTO/page.mdx)[]","description":"The rule types applied on this price set.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"price_list","type":"[PriceListDTO](page.mdx)","description":"The price list associated with the price.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The price list's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The price list's title.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"starts_at","type":"`null` \\| `string`","description":"The price list is enabled starting from this date.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[PriceListStatus](../../enums/pricing.PriceListStatus/page.mdx)","description":"The price list's status.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"ends_at","type":"`null` \\| `string`","description":"The price list expires after this date.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules_count","type":"`number`","description":"Line truncated
@@ -0,0 +1,11 @@
---
displayed_sidebar: pricingReference
---
import { TypeList } from "docs-ui"
# PriceListRuleDTO
The price list rule's details.
<TypeList types={[{"name":"id","type":"`string`","description":"The price list rule's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The value of the rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rule_type","type":"[RuleTypeDTO](../pricing.RuleTypeDTO/page.mdx)","description":"The associated rule type.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the rule type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The display name of the rule type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rule_attribute","type":"`string`","description":"The unique name used to later identify the rule\\_attribute. For example, it can be used in the `context` parameter of\nthe `calculatePrices` method to specify a rule for calculating the price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_priority","type":"`number`","description":"The priority of the rule type. This is useful when calculating the price of a price set, and multiple rules satisfy\nthe provided context. The higher the value, the higher the priority of the rule type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the rule type.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the rule type.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"price_list","type":"[PriceListDTO](../pricing.PriceListDTO/page.mdx)","description":"The associated price list.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The price list's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The price list's title.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"starts_at","type":"`null` \\| `string`","description":"The price list is enabled starting from this date.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[PriceListStatus](../../enums/pricing.PriceListStatus/page.mdx)","description":"The price list's status.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"ACTIVE","type":"`\"active\"`","description":"The price list is enabled and its prices can be used.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"DRAFT","type":"`\"draft\"`","description":"The price list is disabled, meaning its prices can't be used yet.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"ends_at","type":"`null` \\| `string`","description":"The price list expires after this date.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules_count","type":"`number`","description":"The number of rules associated with this price list.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"[PriceDTO](../pricing.PriceDTO/page.mdx)[]","description":"The associated price set money amounts.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of a price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"When the price was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"When the price was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"When the price was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The title of the price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency code of this price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../types/pricing.BigNumberValue/page.mdx)","description":"The price of this price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"[BigNumberValue](../../types/pricing.BigNumberValue/page.mdx)","description":"The minimum quantity required to be purchased for this price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"[BigNumberValue](../../types/pricing.BigNumberValue/page.mdx)","description":"The maximum quantitLine truncated
@@ -0,0 +1,11 @@
---
displayed_sidebar: pricingReference
---
import { TypeList } from "docs-ui"
# PriceListRuleValueDTO
The price list rule value's details.
<TypeList types={[{"name":"id","type":"`string`","description":"The price list rule value's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The rule's value.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_list_rule","type":"[PriceListRuleDTO](../pricing.PriceListRuleDTO/page.mdx)","description":"The associated price list rule.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The price list rule's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The value of the rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rule_type","type":"[RuleTypeDTO](../pricing.RuleTypeDTO/page.mdx)","description":"The associated rule type.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the rule type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The display name of the rule type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rule_attribute","type":"`string`","description":"The unique name used to later identify the rule\\_attribute. For example, it can be used in the `context` parameter of\nthe `calculatePrices` method to specify a rule for calculating the price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_priority","type":"`number`","description":"The priority of the rule type. This is useful when calculating the price of a price set, and multiple rules satisfy\nthe provided context. The higher the value, the higher the priority of the rule type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the rule type.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the rule type.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"price_list","type":"[PriceListDTO](../pricing.PriceListDTO/page.mdx)","description":"The associated price list.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The price list's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The price list's title.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"starts_at","type":"`null` \\| `string`","description":"The price list is enabled starting from this date.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[PriceListStatus](../../enums/pricing.PriceListStatus/page.mdx)","description":"The price list's status.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"ends_at","type":"`null` \\| `string`","description":"The price list expires after this date.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules_count","type":"`number`","description":"The number of rules associated with this price list.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"[PriceDTO](../pricing.PriceDTO/page.mdx)[]","description":"The associated price set money amounts.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"money_amounts","type":"[MoneyAmountDTO](../pricing.MoneyAmountDTO/page.mdx)[]","description":"The associated money amounts.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"rule_types","type":"[RuleTypeDTO](../pricing.RuleTypeDTO/page.mdx)[]","description":"The associated rule types.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"rules","type":"[PriceListRuleDTO](../pricing.PriceListRuleDTO/page.mdx)[]","description":"The price set's rules.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"price_list_rules","type":"[PriceListRuleDTO](../pricing.PriceListRuleDTO/page.mdx)[]","description":"The price set's rules.","optional":true,"defaultValue":"","expandable":true,"children":[]}]},{"name":"price_list_rule_values","type":"[PriceListRuleValueDTO](page.mdx)[]","description":"The associated rule values.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The price list rule value's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The rule's value.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_list_rule","type":"[PriceListRuleDTO](../pricing.PriceListRuleDTO/page.mdx)",Line truncated
@@ -0,0 +1,11 @@
---
displayed_sidebar: pricingReference
---
import { TypeList } from "docs-ui"
# PriceRuleDTO
A price rule's data.
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the price rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_set_id","type":"`string`","description":"The ID of the associated price set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_set","type":"[PriceSetDTO](../pricing.PriceSetDTO/page.mdx)","description":"The associated price set.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the price set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"[MoneyAmountDTO](../pricing.MoneyAmountDTO/page.mdx)[]","description":"The prices that belong to this price set.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"When the money\\_amount was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"When the money\\_amount was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"When the money\\_amount was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency code of this money amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../types/pricing.BigNumberValue/page.mdx)","description":"The price of this money amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"[BigNumberValue](../../types/pricing.BigNumberValue/page.mdx)","description":"The minimum quantity required to be purchased for this price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"[BigNumberValue](../../types/pricing.BigNumberValue/page.mdx)","description":"The maximum quantity required to be purchased for this price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"rule_types","type":"[RuleTypeDTO](../pricing.RuleTypeDTO/page.mdx)[]","description":"The rule types applied on this price set.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the rule type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The display name of the rule type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rule_attribute","type":"`string`","description":"The unique name used to later identify the rule\\_attribute. For example, it can be used in the `context` parameter of\nthe `calculatePrices` method to specify a rule for calculating the price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_priority","type":"`number`","description":"The priority of the rule type. This is useful when calculating the price of a price set, and multiple rules satisfy\nthe provided context. The higher the value, the higher the priority of the rule type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the rule type.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the rule type.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"rule_type_id","type":"`string`","description":"The ID of the associated rule type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rule_type","type":"[RuleTypeDTO](../pricing.RuleTypeDTO/page.mdx)","description":"The associated rule type.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the rule type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The display name of the rule type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rule_attribute","type":"`string`","description":"The unique name used to later identify the rule\\_attribute. For example, it can be used in the `context` parameter of\nthe `calculatePrices` method to specify a rule for calculating the price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_priority","type":"`number`","description":"The priority of the rule type. This is useful when calculating the price of a price set, and multiple rules satisfy\nthe prLine truncated
@@ -0,0 +1,11 @@
---
displayed_sidebar: pricingReference
---
import { TypeList } from "docs-ui"
# PriceSetDTO
A price set's data.
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the price set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"[MoneyAmountDTO](../pricing.MoneyAmountDTO/page.mdx)[]","description":"The prices that belong to this price set.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the money amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"When the money\\_amount was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"When the money\\_amount was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"When the money\\_amount was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency code of this money amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../types/pricing.BigNumberValue/page.mdx)","description":"The price of this money amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"[BigNumberValue](../../types/pricing.BigNumberValue/page.mdx)","description":"The minimum quantity required to be purchased for this price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"[BigNumberValue](../../types/pricing.BigNumberValue/page.mdx)","description":"The maximum quantity required to be purchased for this price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"rule_types","type":"[RuleTypeDTO](../pricing.RuleTypeDTO/page.mdx)[]","description":"The rule types applied on this price set.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the rule type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The display name of the rule type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rule_attribute","type":"`string`","description":"The unique name used to later identify the rule\\_attribute. For example, it can be used in the `context` parameter of\nthe `calculatePrices` method to specify a rule for calculating the price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_priority","type":"`number`","description":"The priority of the rule type. This is useful when calculating the price of a price set, and multiple rules satisfy\nthe provided context. The higher the value, the higher the priority of the rule type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the rule type.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the rule type.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="PriceSetDTO"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: pricingReference
---
import { TypeList } from "docs-ui"
# PricingContext
The context to calculate prices. For example, you can specify the currency code to calculate prices in.
<TypeList types={[{"name":"context","type":"`Record<string, [BigNumberInput](../../types/pricing.BigNumberInput/page.mdx)>`","description":"an object whose keys are the name of the context attribute. Its value can be a string or a BigNumberInput. For example, you can pass the `currency_code` property with its value being the currency code to calculate the price in.\nAnother 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.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="PricingContext"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: pricingReference
---
import { TypeList } from "docs-ui"
# PricingFilters
Filters to apply when calculating prices.
<TypeList types={[{"name":"id","type":"`string`[]","description":"IDs of the price sets to use in the\ncalculation.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="PricingFilters"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: pricingReference
---
import { TypeList } from "docs-ui"
# RemovePriceListRulesDTO
The rules to remove from a price list.
<TypeList types={[{"name":"price_list_id","type":"`string`","description":"The ID of the price list to remove rules from.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"`string`[]","description":"The rules to remove from the price list. Each item being a rule type's `rule_attribute`.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="RemovePriceListRulesDTO"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: pricingReference
---
import { TypeList } from "docs-ui"
# RemovePriceSetRulesDTO
The rules to remove from a price set.
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the price set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"`string`[]","description":"The rules to remove. Each string is the `rule_attribute` of a rule to remove.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="RemovePriceSetRulesDTO"/>
@@ -0,0 +1,15 @@
---
displayed_sidebar: pricingReference
---
import { TypeList } from "docs-ui"
# RestoreReturn
An object that is used to specify an entity's related entities that should be restored when the main entity is restored.
## Type parameters
<TypeList types={[{"name":"TReturnableLinkableKeys","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="RestoreReturn"/>
<TypeList types={[{"name":"returnLinkableKeys","type":"TReturnableLinkableKeys[]","description":"An array of strings, each being the ID attribute names of the entity's relations.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="RestoreReturn"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: pricingReference
---
import { TypeList } from "docs-ui"
# RuleTypeDTO
A rule type's data.
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the rule type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The display name of the rule type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rule_attribute","type":"`string`","description":"The unique name used to later identify the rule\\_attribute. For example, it can be used in the `context` parameter of\nthe `calculatePrices` method to specify a rule for calculating the price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_priority","type":"`number`","description":"The priority of the rule type. This is useful when calculating the price of a price set, and multiple rules satisfy\nthe provided context. The higher the value, the higher the priority of the rule type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the rule type.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the rule type.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="RuleTypeDTO"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: pricingReference
---
import { TypeList } from "docs-ui"
# SetPriceListRulesDTO
The rules to set in a price list.
<TypeList types={[{"name":"price_list_id","type":"`string`","description":"The ID of the price list to set its rules.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"`Record<string, string \\| string[]>`","description":"The rules to add to the price list. Each key of the object is a rule type's `rule_attribute`, and its value\nis the value(s) of the rule.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="SetPriceListRulesDTO"/>
@@ -0,0 +1,15 @@
---
displayed_sidebar: pricingReference
---
import { TypeList } from "docs-ui"
# SoftDeleteReturn
An object that is used to specify an entity's related entities that should be soft-deleted when the main entity is soft-deleted.
## Type parameters
<TypeList types={[{"name":"TReturnableLinkableKeys","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="SoftDeleteReturn"/>
<TypeList types={[{"name":"returnLinkableKeys","type":"TReturnableLinkableKeys[]","description":"An array of strings, each being the ID attribute names of the entity's relations.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="SoftDeleteReturn"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: pricingReference
---
import { TypeList } from "docs-ui"
# UpdateMoneyAmountDTO
The data to update in a money amount. The `id` is used to identify which money amount to update.
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the money amount to update.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`null` \\| `string`","description":"The code of the currency to associate with the money amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../types/pricing.BigNumberInput/page.mdx)","description":"The price of this money amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"[BigNumberInput](../../types/pricing.BigNumberInput/page.mdx)","description":"The minimum quantity required to be purchased for this money amount to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"[BigNumberInput](../../types/pricing.BigNumberInput/page.mdx)","description":"The maximum quantity required to be purchased for this money amount to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="UpdateMoneyAmountDTO"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: pricingReference
---
import { TypeList } from "docs-ui"
# UpdatePriceListDTO
The attributes to update in a price list.
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the price list to update.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The price list's title.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The price list's description.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"starts_at","type":"`null` \\| `string`","description":"The price list is enabled starting from this date.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"ends_at","type":"`null` \\| `string`","description":"The price list expires after this date.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[PriceListStatus](../../enums/pricing.PriceListStatus/page.mdx)","description":"The price list's status.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"ACTIVE","type":"`\"active\"`","description":"The price list is enabled and its prices can be used.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"DRAFT","type":"`\"draft\"`","description":"The price list is disabled, meaning its prices can't be used yet.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"rules_count","type":"`number`","description":"The number of rules associated with the price list.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[CreatePriceListRules](../pricing.CreatePriceListRules/page.mdx)","description":"The rules to be created and associated with the price list.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="UpdatePriceListDTO"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: pricingReference
---
import { TypeList } from "docs-ui"
# UpdatePriceListPriceDTO
The data to update in a money amount. The `id` is used to identify which money amount to update.
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the money amount to update.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_set_id","type":"`string`","description":"The ID of the associated price set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`null` \\| `string`","description":"The code of the currency to associate with the money amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../types/pricing.BigNumberInput/page.mdx)","description":"The price of this money amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"[BigNumberInput](../../types/pricing.BigNumberInput/page.mdx)","description":"The minimum quantity required to be purchased for this money amount to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"[BigNumberInput](../../types/pricing.BigNumberInput/page.mdx)","description":"The maximum quantity required to be purchased for this money amount to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[CreatePriceSetPriceRules](../pricing.CreatePriceSetPriceRules/page.mdx)","description":"The rules to add to the price. The object's keys are rule types' `rule_attribute` attribute, and values are the value of that rule associated with this price.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="UpdatePriceListPriceDTO"/>
Loaded 100 of 6187 files, more files were not shown because too many files have changed in this diff. Show more