Skip to main content
Skip to main content

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:

const ruleType =
await pricingModuleService.retrieveRuleType("rul-typ_123")

To specify relations that should be retrieved:

const ruleType = await pricingModuleService.retrieveRuleType(
"rul-typ_123",
{
relations: ["price_sets"],
}
)

Parameters

idstringRequired
The ID of the rule type to retrieve.
The configurations determining how the rule type is 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 retrieved rule type.
Was this section helpful?