Skip to main content
Skip to main content

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

const ruleTypes = await pricingModuleService.createRuleTypes([
{
name: "Region",
rule_attribute: "region_id",
},
{
name: "Customer Group",
rule_attribute: "customer_group_id",
},
])

Parameters

dataCreateRuleTypeDTO[]Required
The rule types to create.
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

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