Skip to main content
Skip to main content

createTaxRateRules - Tax Module Reference

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

createTaxRateRules(data, sharedContext?): Promise<TaxRateRuleDTO>

This method creates a tax rate rule.

Example

const taxRateRule = await taxModuleService.createTaxRateRules(
{
reference: "product_type",
reference_id: "ptyp_123",
tax_rate_id: "txr_123",
}
)

Parameters

The tax rate rule to be created.
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<TaxRateRuleDTO>Required
The created tax rate rule.

createTaxRateRules(data, sharedContext?): Promise<TaxRateRuleDTO[]>

This method creates tax rate rules.

Example

const taxRateRules =
await taxModuleService.createTaxRateRules([
{
reference: "product_type",
reference_id: "ptyp_123",
tax_rate_id: "txr_123",
},
{
reference: "product",
reference_id: "prod_123",
tax_rate_id: "txr_321",
},
])

Parameters

dataCreateTaxRateRuleDTO[]Required
The tax rate rules to be created.
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<TaxRateRuleDTO[]>Required
The created tax rate rules.
Was this section helpful?