create - Tax Module Reference
This documentation provides a reference to the create
method. This belongs to the Tax Module.
create(data, sharedContext?): Promise<TaxRateDTO[]>
This method creates tax rates.
Example
const taxRates = await taxModuleService.create([
{
tax_region_id: "txreg_123",
name: "Default rate",
rate: 10,
},
{
tax_region_id: "txreg_123",
name: "Custom rate",
rate: 15,
rules: [
{
reference: "product_type",
reference_id: "ptyp_1",
},
{
reference: "product",
reference_id: "prod_123",
},
],
},
])
Parameters
The tax rates to be created.
Returns
The created tax rates.
create(data, sharedContext?): Promise<TaxRateDTO>
This method creates a tax rate.
Example
Parameters
The tax rate to be created.
Returns
The created tax rate.
Was this section helpful?