chore(docs): Generated References (automated) (#7961)
Co-authored-by: kodiakhq <kodiakhq@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
8c30f0a54d
commit
ca9ba9e688
File diff suppressed because one or more lines are too long
@@ -0,0 +1,57 @@
|
||||
---
|
||||
displayed_sidebar: pricingReference
|
||||
slug: /references/pricing/createPricePreferences
|
||||
sidebar_label: createPricePreferences
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# createPricePreferences - Pricing Module Reference
|
||||
|
||||
This documentation provides a reference to the `createPricePreferences` method. This belongs to the Pricing Module.
|
||||
|
||||
## createPricePreferences(data, sharedContext?): Promise<[PricePreferenceDTO](../../../interfaces/pricing.PricePreferenceDTO/page.mdx)>
|
||||
|
||||
This method is used to create a new price preference.
|
||||
|
||||
### Example
|
||||
|
||||
To create a price preference with rule:
|
||||
|
||||
```ts
|
||||
const pricePreference = await pricingModuleService.createPricePreferences({
|
||||
attribute: 'region_id',
|
||||
value: 'DE',
|
||||
is_tax_inclusive: true
|
||||
})
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[CreatePricePreferenceDTO](../../../interfaces/pricing.CreatePricePreferenceDTO/page.mdx)","description":"The attributes of the price preference to create.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"attribute","type":"`string`","description":"The rule attribute for the preference","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The rule value for the preference","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`boolean`","description":"Flag specifying whether prices for the specified rule are tax inclusive.","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="createPricePreferences"/>
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[PricePreferenceDTO](../../../interfaces/pricing.PricePreferenceDTO/page.mdx)>","optional":false,"defaultValue":"","description":"The created price preference.","expandable":false,"children":[{"name":"PricePreferenceDTO","type":"[PricePreferenceDTO](../../../interfaces/pricing.PricePreferenceDTO/page.mdx)","optional":false,"defaultValue":"","description":"A price preference's data.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of a price preference.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"attribute","type":"`null` \\| `string`","description":"The rule attribute for the preference","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`null` \\| `string`","description":"The rule value for the preference","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`boolean`","description":"Flag specifying whether prices for the specified rule are tax inclusive.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"When the price preference was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"When the price preference was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"When the price preference was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="createPricePreferences"/>
|
||||
|
||||
## createPricePreferences(data, sharedContext?): Promise<[PricePreferenceDTO](../../../interfaces/pricing.PricePreferenceDTO/page.mdx)[]>
|
||||
|
||||
This method is used to create multiple price preferences.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
const pricePreferences = await pricingModuleService.createPricePreferences([{
|
||||
attribute: 'region_id',
|
||||
value: 'DE',
|
||||
is_tax_inclusive: true
|
||||
}])
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[CreatePricePreferenceDTO](../../../interfaces/pricing.CreatePricePreferenceDTO/page.mdx)[]","description":"The price preferences to create.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"attribute","type":"`string`","description":"The rule attribute for the preference","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The rule value for the preference","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`boolean`","description":"Flag specifying whether prices for the specified rule are tax inclusive.","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="createPricePreferences"/>
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[PricePreferenceDTO](../../../interfaces/pricing.PricePreferenceDTO/page.mdx)[]>","optional":false,"defaultValue":"","description":"The list of created price preferences.","expandable":false,"children":[{"name":"PricePreferenceDTO[]","type":"[PricePreferenceDTO](../../../interfaces/pricing.PricePreferenceDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"PricePreferenceDTO","type":"`object`","description":"A price preference's data.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="createPricePreferences"/>
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,27 @@
|
||||
---
|
||||
displayed_sidebar: pricingReference
|
||||
slug: /references/pricing/deletePricePreferences
|
||||
sidebar_label: deletePricePreferences
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# deletePricePreferences - Pricing Module Reference
|
||||
|
||||
This documentation provides a reference to the `deletePricePreferences` method. This belongs to the Pricing Module.
|
||||
|
||||
This method deletes price preferences by their IDs.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
await pricingModuleService.deletePricePreferences(["prpref_123", "prpref_321"])
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"ids","type":"`string`[]","description":"The IDs of the price preferences 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="deletePricePreferences"/>
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<void>","optional":false,"defaultValue":"","description":"Resolves when the price preferences are successfully deleted.","expandable":false,"children":[]}]} sectionTitle="deletePricePreferences"/>
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,30 @@
|
||||
---
|
||||
displayed_sidebar: pricingReference
|
||||
slug: /references/pricing/restorePricePreferences
|
||||
sidebar_label: restorePricePreferences
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# restorePricePreferences - Pricing Module Reference
|
||||
|
||||
This documentation provides a reference to the `restorePricePreferences` method. This belongs to the Pricing Module.
|
||||
|
||||
This method restores soft deleted price preferences by their IDs.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
await pricingModuleService.restorePricePreferences([
|
||||
"prpref_123",
|
||||
"prpref_321",
|
||||
])
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"pricePreferenceIds","type":"`string`[]","description":"The IDs of the price preferences.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[RestoreReturn](../../../interfaces/pricing.RestoreReturn/page.mdx)<TReturnableLinkableKeys>","description":"Configurations determining which relations to restore along with each of the price preferences.","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="restorePricePreferences"/>
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<void \\| Record<string, string[]>>","optional":false,"defaultValue":"","description":"An object that includes the IDs of related records that were restored.\nThe object's keys are the ID attribute names of the price preferences entity's relations,\nand its value is an array of strings, each being the ID of the record associated with the price preferences through this relation.\n\nIf there are no related records restored, the promise resolves to `void`.","expandable":false,"children":[{"name":"void \\| Record<string, string[]>","type":"`void` \\| `Record<string, string[]>`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} sectionTitle="restorePricePreferences"/>
|
||||
@@ -0,0 +1,30 @@
|
||||
---
|
||||
displayed_sidebar: pricingReference
|
||||
slug: /references/pricing/retrievePricePreference
|
||||
sidebar_label: retrievePricePreference
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# retrievePricePreference - Pricing Module Reference
|
||||
|
||||
This documentation provides a reference to the `retrievePricePreference` method. This belongs to the Pricing Module.
|
||||
|
||||
This method is used to retrieve a price preference by its ID.
|
||||
|
||||
## Example
|
||||
|
||||
A simple example that retrieves a price preference by its ID:
|
||||
|
||||
```ts
|
||||
const pricePreference =
|
||||
await pricingModuleService.retrievePricePreference("prpref_123")
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the price preference to retrieve.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../../interfaces/pricing.FindConfig/page.mdx)<[PricePreferenceDTO](../../../interfaces/pricing.PricePreferenceDTO/page.mdx)>","description":"The configurations determining how the price preference is retrieved. Its properties, such as `select` or `relations`, accept the\nattributes or relations associated with a price preference.","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":"options","type":"`Record<string, any>`","description":"Enable ORM specific defined options","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="retrievePricePreference"/>
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[PricePreferenceDTO](../../../interfaces/pricing.PricePreferenceDTO/page.mdx)>","optional":false,"defaultValue":"","description":"The retrieved price preference.","expandable":false,"children":[{"name":"PricePreferenceDTO","type":"[PricePreferenceDTO](../../../interfaces/pricing.PricePreferenceDTO/page.mdx)","optional":false,"defaultValue":"","description":"A price preference's data.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of a price preference.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"attribute","type":"`null` \\| `string`","description":"The rule attribute for the preference","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`null` \\| `string`","description":"The rule value for the preference","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`boolean`","description":"Flag specifying whether prices for the specified rule are tax inclusive.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"When the price preference was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"When the price preference was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"When the price preference was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="retrievePricePreference"/>
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,30 @@
|
||||
---
|
||||
displayed_sidebar: pricingReference
|
||||
slug: /references/pricing/softDeletePricePreferences
|
||||
sidebar_label: softDeletePricePreferences
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# softDeletePricePreferences - Pricing Module Reference
|
||||
|
||||
This documentation provides a reference to the `softDeletePricePreferences` method. This belongs to the Pricing Module.
|
||||
|
||||
This method soft deletes price preferences by their IDs.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
await pricingModuleService.softDeletePricePreferences([
|
||||
"prpref_123",
|
||||
"prpref_321",
|
||||
])
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"pricePreferenceIds","type":"`string`[]","description":"The IDs of the price preferences.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[SoftDeleteReturn](../../../interfaces/pricing.SoftDeleteReturn/page.mdx)<TReturnableLinkableKeys>","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="softDeletePricePreferences"/>
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<void \\| Record<string, string[]>>","optional":false,"defaultValue":"","description":"An object that includes the IDs of related records that were also soft deleted.\nThe object's keys are the ID attribute names of the price preference entity's relations, and its value is an array of strings, each being the ID of a record associated.\n\nIf there are no related records, the promise resolves to `void`.","expandable":false,"children":[{"name":"void \\| Record<string, string[]>","type":"`void` \\| `Record<string, string[]>`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} sectionTitle="softDeletePricePreferences"/>
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,61 @@
|
||||
---
|
||||
displayed_sidebar: pricingReference
|
||||
slug: /references/pricing/upsertPricePreferences
|
||||
sidebar_label: upsertPricePreferences
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# upsertPricePreferences - Pricing Module Reference
|
||||
|
||||
This documentation provides a reference to the `upsertPricePreferences` method. This belongs to the Pricing Module.
|
||||
|
||||
## upsertPricePreferences(data, sharedContext?): Promise<[PricePreferenceDTO](../../../interfaces/pricing.PricePreferenceDTO/page.mdx)[]>
|
||||
|
||||
This method updates existing price preferences, or creates new ones if they don't exist.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
const pricePreferences = await pricingModuleService.upsertPricePreferences([
|
||||
{
|
||||
id: "prpref_123",
|
||||
attribute: 'region_id',
|
||||
value: 'DE',
|
||||
is_tax_inclusive: true
|
||||
},
|
||||
])
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[UpsertPricePreferenceDTO](../../../interfaces/pricing.UpsertPricePreferenceDTO/page.mdx)[]","description":"The attributes to update or create for each price preference.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of a price preference.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"attribute","type":"`null` \\| `string`","description":"The rule attribute for the preference","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`null` \\| `string`","description":"The rule value for the preference","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`boolean`","description":"Flag specifying whether prices for the specified rule are tax inclusive.","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="upsertPricePreferences"/>
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[PricePreferenceDTO](../../../interfaces/pricing.PricePreferenceDTO/page.mdx)[]>","optional":false,"defaultValue":"","description":"The updated and created price preferences.","expandable":false,"children":[{"name":"PricePreferenceDTO[]","type":"[PricePreferenceDTO](../../../interfaces/pricing.PricePreferenceDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"PricePreferenceDTO","type":"`object`","description":"A price preference's data.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="upsertPricePreferences"/>
|
||||
|
||||
## upsertPricePreferences(data, sharedContext?): Promise<[PricePreferenceDTO](../../../interfaces/pricing.PricePreferenceDTO/page.mdx)>
|
||||
|
||||
This method updates the price preference if it exists, or creates a new ones if it doesn't.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
const pricePreference = await pricingModuleService.upsertPricePreferences(
|
||||
{
|
||||
id: "prpref_123",
|
||||
attribute: 'region_id',
|
||||
value: 'DE',
|
||||
is_tax_inclusive: true
|
||||
}
|
||||
)
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[UpsertPricePreferenceDTO](../../../interfaces/pricing.UpsertPricePreferenceDTO/page.mdx)","description":"The attributes to update or create for the new price preference.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of a price preference.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"attribute","type":"`null` \\| `string`","description":"The rule attribute for the preference","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`null` \\| `string`","description":"The rule value for the preference","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`boolean`","description":"Flag specifying whether prices for the specified rule are tax inclusive.","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="upsertPricePreferences"/>
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[PricePreferenceDTO](../../../interfaces/pricing.PricePreferenceDTO/page.mdx)>","optional":false,"defaultValue":"","description":"The updated or created price preference.","expandable":false,"children":[{"name":"PricePreferenceDTO","type":"[PricePreferenceDTO](../../../interfaces/pricing.PricePreferenceDTO/page.mdx)","optional":false,"defaultValue":"","description":"A price preference's data.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of a price preference.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"attribute","type":"`null` \\| `string`","description":"The rule attribute for the preference","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`null` \\| `string`","description":"The rule value for the preference","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`boolean`","description":"Flag specifying whether prices for the specified rule are tax inclusive.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"When the price preference was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"When the price preference was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"When the price preference was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="upsertPricePreferences"/>
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user