Skip to main content
Skip to main content

update - Region Module Reference

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

update(id, data, sharedContext?): Promise<RegionDTO>

This method updates an existing region.

Example

const region = await regionModuleService.update("reg_123", {
automatic_taxes: false,
})

Parameters

idstringRequired
The ID of the region.
dataUpdateRegionDTORequired
The attributes to update in the region.
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<RegionDTO>Required
The updated region.

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

This method updates existing regions.

Example

const region = await regionModuleService.update(
{
name: "Europe",
},
{
automatic_taxes: false,
}
)

Parameters

selectorFilterableRegionPropsRequired
The filters to apply on the retrieved regions.
dataUpdateRegionDTORequired
The attributes to update in the region.
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<RegionDTO[]>Required
The updated regions.
Was this section helpful?