Skip to main content
Skip to main content

updateMoneyAmounts - Pricing Module Reference

Beta

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

This method updates existing money amounts.

Example

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

async function updateMoneyAmounts (moneyAmountId: string, amount: number) {
const pricingService = await initializePricingModule()

const moneyAmounts = await pricingService.updateMoneyAmounts([
{
id: moneyAmountId,
amount
}
])

// do something with the money amounts or return them
}

Parameters

dataUpdateMoneyAmountDTO[]Required
The money amounts to update, each having the attributes that should be updated in a money amount.
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<MoneyAmountDTO[]>Required
The list of updated money amounts.
Was this section helpful?