Skip to main content
Skip to main content

removeRules - Pricing Module Reference

Beta

This documentation provides a reference to the removeRules method. This belongs to the Pricing Module.

This method remove rules from a price set.

Example

import {
initialize as initializePricingModule,
} from "@medusajs/pricing"

async function removePriceSetRule (priceSetId: string, ruleAttributes: []) {
const pricingService = await initializePricingModule()

await pricingService.removeRules([
{
id: priceSetId,
rules: ruleAttributes
},
])
}

Parameters

The rules to remove per price set.
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<void>Required
Resolves when rules are successfully removed.
Was this section helpful?