Skip to main content
Skip to main content

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:

const ruleTypes = await pricingModuleService.listRuleTypes({
id: ["rul-typ_123", "rul-typ_321"],
})

To specify relations that should be retrieved:

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:

const ruleTypes = await pricingModuleService.listRuleTypes(
{
id: ["rul-typ_123", "rul-typ_321"],
},
{
relations: ["price_sets"],
take: 20,
skip: 2,
}
)

Parameters

The filters to apply on the retrieved rule types.
The configurations determining how the rule types are retrieved. Its properties, such as select or relations, accept the attributes or relations associated with a rule type.
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<RuleTypeDTO[]>Required
The list of rule types.
Was this section helpful?