Skip to main content
Skip to main content

updateCurrencies - Pricing Module Reference

Beta

This 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

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

Returns

PromisePromise<CurrencyDTO[]>Required
The list of updated currencies.
Was this section helpful?