updateCurrencies - Pricing Module Reference
BetaThis documentation provides a reference to the updateCurrencies
method. This belongs to the Pricing Module.
This method is used to update existing currencies with the provided data. In each currency object, the currency code must be provided to identify which currency to update.
Example
import {
initialize as initializePricingModule,
} from "@medusajs/pricing"
async function updateCurrencies () {
const pricingService = await initializePricingModule()
const currencies = await pricingService.updateCurrencies([
{
code: "USD",
symbol: "$",
}
])
// do something with the currencies or return them
}
Parameters
The currencies to update, each having the attributes that should be updated in a currency.
sharedContext
ContextA context used to share resources, such as transaction manager, between the application and the module.
sharedContext
ContextReturns
The list of updated currencies.
Was this section helpful?