Skip to main content
Skip to main content

removePriceListRules - Pricing Module Reference

Beta

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

This method is used to remove rules from a price list.

Example

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

async function setPriceListRules (priceListId: string) {
const pricingService = await initializePricingModule()

const priceList = await pricingService.removePriceListRules({
priceListId,
rules: ["region_id"]
})

// do something with the price list or return it
}

Parameters

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

Returns

PromisePromise<PriceListDTO>Required
The updated price lists.
Was this section helpful?