Skip to main content
Skip to main content

update - Tax Module Reference

This documentation provides a reference to the update method. This belongs to the Tax Module.

update(taxRateId, data, sharedContext?): Promise<TaxRateDTO>

This method updates an existing tax rate.

Example

const taxRate = await taxModuleService.update("txr_123", {
rate: 10,
})

Parameters

taxRateIdstringRequired
The tax rate's ID.
dataUpdateTaxRateDTORequired
The attributes to update in the tax rate.
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<TaxRateDTO>Required
The updated tax rate.

update(taxRateIds, data, sharedContext?): Promise<TaxRateDTO[]>

This method updates existing tax rates.

Example

const taxRates = await taxModuleService.update(
["txr_123", "txr_321"],
{
rate: 10,
}
)

Parameters

taxRateIdsstring[]Required
The IDs of tax rates to update.
dataUpdateTaxRateDTORequired
The attributes to update in the tax rate.
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<TaxRateDTO[]>Required
The updated tax rates.

update(selector, data, sharedContext?): Promise<TaxRateDTO[]>

This method updates existing tax rates matching the specified filters.

Example

const taxRates = await taxModuleService.update(
{
id: ["txr_123", "txr_321"],
},
{
rate: 10,
}
)

Parameters

selectorFilterableTaxRatePropsRequired
The filters specifying which tax rates to update.
dataUpdateTaxRateDTORequired
The attributes to update in the tax rate.
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<TaxRateDTO[]>Required
The updated tax rates.
Was this section helpful?