updateMoneyAmounts - Pricing Module Reference
BetaThis 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
The money amounts to update, each having the attributes that should be updated in a money amount.
sharedContextContextA context used to share resources, such as transaction manager, between the application and the module.
sharedContextContextReturns
The list of updated money amounts.
Was this section helpful?