chore(docs): Generated References (automated) (#9727)
Generated the following references: - `api_key` - `auth` - `cart` - `core_flows` - `currency` - `customer` - `dml` - `fulfillment` - `helper_steps` - `inventory_next` - `js_sdk` - `medusa` - `medusa_config` - `modules` - `modules_sdk` - `notification` - `order` - `order_models` - `payment` - `pricing` - `product` - `promotion` - `region` - `sales_channel` - `stock_location_next` - `store` - `tax` - `tax_provider` - `types` - `user` - `utils` - `workflows` Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com> Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
This commit is contained in:
2313 files changed
+533036
-383477
No files matched your search
+6
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
This documentation provides a reference to the `createTaxRateRules` method. This belongs to the Tax Module.
|
||||
|
||||
<Note>
|
||||
|
||||
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
|
||||
|
||||
</Note>
|
||||
|
||||
## createTaxRateRules(data, sharedContext?): Promise<[TaxRateRuleDTO](../../../interfaces/tax.TaxRateRuleDTO/page.mdx)>
|
||||
|
||||
This method creates a tax rate rule.
|
||||
|
||||
+6
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
This documentation provides a reference to the `createTaxRates` method. This belongs to the Tax Module.
|
||||
|
||||
<Note>
|
||||
|
||||
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
|
||||
|
||||
</Note>
|
||||
|
||||
## createTaxRates(data, sharedContext?): Promise<[TaxRateDTO](../../../interfaces/tax.TaxRateDTO/page.mdx)[]>
|
||||
|
||||
This method creates tax rates.
|
||||
|
||||
+6
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
This documentation provides a reference to the `createTaxRegions` method. This belongs to the Tax Module.
|
||||
|
||||
<Note>
|
||||
|
||||
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
|
||||
|
||||
</Note>
|
||||
|
||||
## createTaxRegions(data, sharedContext?): Promise<[TaxRegionDTO](../../../interfaces/tax.TaxRegionDTO/page.mdx)>
|
||||
|
||||
This method creates a tax region.
|
||||
|
||||
+6
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
This documentation provides a reference to the `deleteTaxRateRules` method. This belongs to the Tax Module.
|
||||
|
||||
<Note>
|
||||
|
||||
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
|
||||
|
||||
</Note>
|
||||
|
||||
## deleteTaxRateRules(taxRateRuleId, sharedContext?): Promise<void>
|
||||
|
||||
This method deletes a tax rate rule by its ID.
|
||||
|
||||
+6
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
This documentation provides a reference to the `deleteTaxRates` method. This belongs to the Tax Module.
|
||||
|
||||
<Note>
|
||||
|
||||
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
|
||||
|
||||
</Note>
|
||||
|
||||
## deleteTaxRates(taxRateIds, sharedContext?): Promise<void>
|
||||
|
||||
This method deletes tax rates by their IDs.
|
||||
|
||||
+6
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
This documentation provides a reference to the `deleteTaxRegions` method. This belongs to the Tax Module.
|
||||
|
||||
<Note>
|
||||
|
||||
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
|
||||
|
||||
</Note>
|
||||
|
||||
## deleteTaxRegions(taxRegionIds, sharedContext?): Promise<void>
|
||||
|
||||
This method deletes tax regions by their IDs.
|
||||
|
||||
+6
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
This documentation provides a reference to the `getTaxLines` method. This belongs to the Tax Module.
|
||||
|
||||
<Note>
|
||||
|
||||
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
|
||||
|
||||
</Note>
|
||||
|
||||
This method retrieves tax lines for taxable items and shipping methods in a cart.
|
||||
|
||||
Learn more in [this guide](https://docs.medusajs.com/experimental/tax/tax-calculation-with-provider/).
|
||||
|
||||
+6
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
This documentation provides a reference to the `listAndCountTaxRates` method. This belongs to the Tax Module.
|
||||
|
||||
<Note>
|
||||
|
||||
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
|
||||
|
||||
</Note>
|
||||
|
||||
This method retrieves a paginated list of tax rates along with the total count of available tax rates satisfying the provided filters.
|
||||
|
||||
## Example
|
||||
|
||||
+6
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
This documentation provides a reference to the `listTaxRateRules` method. This belongs to the Tax Module.
|
||||
|
||||
<Note>
|
||||
|
||||
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
|
||||
|
||||
</Note>
|
||||
|
||||
This method retrieves a paginated list of tax rate rules based on optional filters and configuration.
|
||||
|
||||
## Example
|
||||
|
||||
+6
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
This documentation provides a reference to the `listTaxRates` method. This belongs to the Tax Module.
|
||||
|
||||
<Note>
|
||||
|
||||
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
|
||||
|
||||
</Note>
|
||||
|
||||
This method retrieves a paginated list of tax rates based on optional filters and configuration.
|
||||
|
||||
## Example
|
||||
|
||||
+6
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
This documentation provides a reference to the `listTaxRegions` method. This belongs to the Tax Module.
|
||||
|
||||
<Note>
|
||||
|
||||
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
|
||||
|
||||
</Note>
|
||||
|
||||
This method retrieves a paginated list of tax regions based on optional filters and configuration.
|
||||
|
||||
## Example
|
||||
|
||||
+6
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
This documentation provides a reference to the `restoreTaxRateRules` method. This belongs to the Tax Module.
|
||||
|
||||
<Note>
|
||||
|
||||
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
|
||||
|
||||
</Note>
|
||||
|
||||
This method restores soft deleted tax rate rules by their IDs.
|
||||
|
||||
## Example
|
||||
|
||||
+6
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
This documentation provides a reference to the `restoreTaxRates` method. This belongs to the Tax Module.
|
||||
|
||||
<Note>
|
||||
|
||||
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
|
||||
|
||||
</Note>
|
||||
|
||||
This method restores soft deleted tax rates by their IDs.
|
||||
|
||||
## Example
|
||||
|
||||
+6
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
This documentation provides a reference to the `restoreTaxRegions` method. This belongs to the Tax Module.
|
||||
|
||||
<Note>
|
||||
|
||||
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
|
||||
|
||||
</Note>
|
||||
|
||||
This method restores soft deleted tax regions by their IDs.
|
||||
|
||||
## Example
|
||||
|
||||
+6
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
This documentation provides a reference to the `retrieveTaxRate` method. This belongs to the Tax Module.
|
||||
|
||||
<Note>
|
||||
|
||||
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
|
||||
|
||||
</Note>
|
||||
|
||||
This method retrieves a tax by its ID.
|
||||
|
||||
## Example
|
||||
|
||||
+6
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
This documentation provides a reference to the `softDeleteTaxRateRules` method. This belongs to the Tax Module.
|
||||
|
||||
<Note>
|
||||
|
||||
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
|
||||
|
||||
</Note>
|
||||
|
||||
This method soft deletes tax rate rules by their IDs.
|
||||
|
||||
## Example
|
||||
|
||||
+6
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
This documentation provides a reference to the `softDeleteTaxRates` method. This belongs to the Tax Module.
|
||||
|
||||
<Note>
|
||||
|
||||
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
|
||||
|
||||
</Note>
|
||||
|
||||
This method soft deletes tax raes by their IDs.
|
||||
|
||||
## Example
|
||||
|
||||
+6
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
This documentation provides a reference to the `softDeleteTaxRegions` method. This belongs to the Tax Module.
|
||||
|
||||
<Note>
|
||||
|
||||
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
|
||||
|
||||
</Note>
|
||||
|
||||
This method soft deletes tax regions by their IDs.
|
||||
|
||||
## Example
|
||||
|
||||
+9
-3
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
This documentation provides a reference to the `updateTaxRates` method. This belongs to the Tax Module.
|
||||
|
||||
<Note>
|
||||
|
||||
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
|
||||
|
||||
</Note>
|
||||
|
||||
## updateTaxRates(taxRateId, data, sharedContext?): Promise<[TaxRateDTO](../../../interfaces/tax.TaxRateDTO/page.mdx)>
|
||||
|
||||
This method updates an existing tax rate.
|
||||
@@ -24,7 +30,7 @@ const taxRate = await taxModuleService.updateTaxRates("txr_123", {
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"taxRateId","type":"`string`","description":"The tax rate's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"[UpdateTaxRateDTO](../../../interfaces/tax.UpdateTaxRateDTO/page.mdx)","description":"The attributes to update in the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"rate","type":"`null` \\| `number`","description":"The rate to charge.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`null` \\| `string`","description":"The code of the tax rate.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the tax rate.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"Omit<[CreateTaxRateRuleDTO](../../../interfaces/tax.CreateTaxRateRuleDTO/page.mdx), \"tax_rate_id\">[]","description":"The rules of the tax rate.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"reference","type":"`string`","description":"The snake-case name of the data model that the tax rule references.\nFor example, `product`.\n\nLearn more in [this guide](https://docs.medusajs.com/experimental/tax/tax-rates-and-rules/#what-are-tax-rules).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference_id","type":"`string`","description":"The ID of the record of the data model that the tax rule references.\nFor example, `prod_123`.\n\nLearn more in [this guide](https://docs.medusajs.com/experimental/tax/tax-rates-and-rules/#what-are-tax-rules).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../../types/tax.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"Who created the tax rate rule. For example, the ID of the\nuser that created it.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"is_default","type":"`boolean`","description":"Whether the tax rate is default.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_combinable","type":"`boolean`","description":"Whether the tax rate is combinable.\n\nLearn more [here](https://docs.medusajs.com/v2/resources/commerce-modules/tax/tax-rates-and-rules#combinable-tax-rates).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_by","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../../types/tax.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/tax.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/tax.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","Line truncated
|
||||
<TypeList types={[{"name":"taxRateId","type":"`string`","description":"The tax rate's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"[UpdateTaxRateDTO](../../../interfaces/tax.UpdateTaxRateDTO/page.mdx)","description":"The attributes to update in the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"rate","type":"`null` \\| `number`","description":"The rate to charge.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`null` \\| `string`","description":"The code of the tax rate.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the tax rate.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"Omit<[CreateTaxRateRuleDTO](../../../interfaces/tax.CreateTaxRateRuleDTO/page.mdx), \"tax_rate_id\">[]","description":"The rules of the tax rate.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"reference","type":"`string`","description":"The snake-case name of the data model that the tax rule references.\nFor example, `product`.\n\nLearn more in [this guide](https://docs.medusajs.com/experimental/tax/tax-rates-and-rules/#what-are-tax-rules).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference_id","type":"`string`","description":"The ID of the record of the data model that the tax rule references.\nFor example, `prod_123`.\n\nLearn more in [this guide](https://docs.medusajs.com/experimental/tax/tax-rates-and-rules/#what-are-tax-rules).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../../types/tax.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"Who created the tax rate rule. For example, the ID of the\nuser that created it.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"is_default","type":"`boolean`","description":"Whether the tax rate is default.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_combinable","type":"`boolean`","description":"Whether the tax rate is combinable.\n\nLearn more [here](https://docs.medusajs.com/v2/resources/commerce-modules/tax/tax-rates-and-rules#combinable-tax-rates).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../../types/tax.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/tax.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/tax.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"chilLine truncated
|
||||
|
||||
### Returns
|
||||
|
||||
@@ -47,7 +53,7 @@ const taxRates = await taxModuleService.updateTaxRates(
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"taxRateIds","type":"`string`[]","description":"The IDs of tax rates to update.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"[UpdateTaxRateDTO](../../../interfaces/tax.UpdateTaxRateDTO/page.mdx)","description":"The attributes to update in the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"rate","type":"`null` \\| `number`","description":"The rate to charge.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`null` \\| `string`","description":"The code of the tax rate.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the tax rate.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"Omit<[CreateTaxRateRuleDTO](../../../interfaces/tax.CreateTaxRateRuleDTO/page.mdx), \"tax_rate_id\">[]","description":"The rules of the tax rate.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"reference","type":"`string`","description":"The snake-case name of the data model that the tax rule references.\nFor example, `product`.\n\nLearn more in [this guide](https://docs.medusajs.com/experimental/tax/tax-rates-and-rules/#what-are-tax-rules).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference_id","type":"`string`","description":"The ID of the record of the data model that the tax rule references.\nFor example, `prod_123`.\n\nLearn more in [this guide](https://docs.medusajs.com/experimental/tax/tax-rates-and-rules/#what-are-tax-rules).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../../types/tax.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"Who created the tax rate rule. For example, the ID of the\nuser that created it.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"is_default","type":"`boolean`","description":"Whether the tax rate is default.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_combinable","type":"`boolean`","description":"Whether the tax rate is combinable.\n\nLearn more [here](https://docs.medusajs.com/v2/resources/commerce-modules/tax/tax-rates-and-rules#combinable-tax-rates).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_by","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../../types/tax.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/tax.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/tax.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","tyLine truncated
|
||||
<TypeList types={[{"name":"taxRateIds","type":"`string`[]","description":"The IDs of tax rates to update.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"[UpdateTaxRateDTO](../../../interfaces/tax.UpdateTaxRateDTO/page.mdx)","description":"The attributes to update in the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"rate","type":"`null` \\| `number`","description":"The rate to charge.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`null` \\| `string`","description":"The code of the tax rate.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the tax rate.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"Omit<[CreateTaxRateRuleDTO](../../../interfaces/tax.CreateTaxRateRuleDTO/page.mdx), \"tax_rate_id\">[]","description":"The rules of the tax rate.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"reference","type":"`string`","description":"The snake-case name of the data model that the tax rule references.\nFor example, `product`.\n\nLearn more in [this guide](https://docs.medusajs.com/experimental/tax/tax-rates-and-rules/#what-are-tax-rules).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference_id","type":"`string`","description":"The ID of the record of the data model that the tax rule references.\nFor example, `prod_123`.\n\nLearn more in [this guide](https://docs.medusajs.com/experimental/tax/tax-rates-and-rules/#what-are-tax-rules).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../../types/tax.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"Who created the tax rate rule. For example, the ID of the\nuser that created it.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"is_default","type":"`boolean`","description":"Whether the tax rate is default.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_combinable","type":"`boolean`","description":"Whether the tax rate is combinable.\n\nLearn more [here](https://docs.medusajs.com/v2/resources/commerce-modules/tax/tax-rates-and-rules#combinable-tax-rates).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../../types/tax.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/tax.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/tax.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandaLine truncated
|
||||
|
||||
### Returns
|
||||
|
||||
@@ -72,7 +78,7 @@ const taxRates = await taxModuleService.updateTaxRates(
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"selector","type":"[FilterableTaxRateProps](../../../interfaces/tax.FilterableTaxRateProps/page.mdx)","description":"The filters specifying which tax rates to update.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableTaxRateProps](../../../interfaces/tax.FilterableTaxRateProps/page.mdx) \\| [BaseFilterable](../../../interfaces/tax.BaseFilterable/page.mdx)<[FilterableTaxRateProps](../../../interfaces/tax.FilterableTaxRateProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableTaxRateProps](../../../interfaces/tax.FilterableTaxRateProps/page.mdx) \\| [BaseFilterable](../../../interfaces/tax.BaseFilterable/page.mdx)<[FilterableTaxRateProps](../../../interfaces/tax.FilterableTaxRateProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableTaxRateProps](../../../interfaces/tax.FilterableTaxRateProps/page.mdx) \\| [BaseFilterable](../../../interfaces/tax.BaseFilterable/page.mdx)<[FilterableTaxRateProps](../../../interfaces/tax.FilterableTaxRateProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"Find tax rates based on name and code properties through this search term.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"The IDs to filter the tax rates by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_region_id","type":"`string` \\| `string`[]","description":"Filter the tax rates by their associated tax regions.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`number` \\| [OperatorMap](../../../types/tax.OperatorMap/page.mdx)<number> \\| `number`[]","description":"Filter the tax rates by their rate.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string` \\| `string`[] \\| [OperatorMap](../../../types/tax.OperatorMap/page.mdx)<string>","description":"Filter the tax rates by their code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string` \\| `string`[] \\| [OperatorMap](../../../types/tax.OperatorMap/page.mdx)<string>","description":"Filter the tax rates by their name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"[OperatorMap](../../../types/tax.OperatorMap/page.mdx)<string>","description":"Filter the tax rates by their creation date.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"[OperatorMap](../../../types/tax.OperatorMap/page.mdx)<string>","description":"Filter the tax rates by their update date.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`string` \\| `string`[] \\| [OperatorMap](../../../types/tax.OperatorMap/page.mdx)<string>","description":"Filter the tax rates by who created it.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../../../interfaces/tax.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../../../interfaces/tax.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([FilterableTaxRateProps](../../../interfaces/tax.FilterableTaxRateProps/page.mdx) \\| [BaseFilterable](../../../interfaces/tax.BaseFilterable/page.mdx)<[FilterableTaxRateProps](../../../interfaces/tax.FilterableTaxRateProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableTaxRateProps](../../../interfaces/tax.FilterableTaxRateProps/page.mdx) \\| [BaseFilterable](../../../interfaces/tax.BaseFilterable/page.mdx)<[FilterableTaxRateProps](../../../interfaces/tax.FilterableTaxRateProps/page.mdx)>)[]","description":"An Line truncated
|
||||
<TypeList types={[{"name":"selector","type":"[FilterableTaxRateProps](../../../interfaces/tax.FilterableTaxRateProps/page.mdx)","description":"The filters specifying which tax rates to update.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableTaxRateProps](../../../interfaces/tax.FilterableTaxRateProps/page.mdx) \\| [BaseFilterable](../../../interfaces/tax.BaseFilterable/page.mdx)<[FilterableTaxRateProps](../../../interfaces/tax.FilterableTaxRateProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableTaxRateProps](../../../interfaces/tax.FilterableTaxRateProps/page.mdx) \\| [BaseFilterable](../../../interfaces/tax.BaseFilterable/page.mdx)<[FilterableTaxRateProps](../../../interfaces/tax.FilterableTaxRateProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableTaxRateProps](../../../interfaces/tax.FilterableTaxRateProps/page.mdx) \\| [BaseFilterable](../../../interfaces/tax.BaseFilterable/page.mdx)<[FilterableTaxRateProps](../../../interfaces/tax.FilterableTaxRateProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"Find tax rates based on name and code properties through this search term.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"The IDs to filter the tax rates by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_region_id","type":"`string` \\| `string`[]","description":"Filter the tax rates by their associated tax regions.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`number` \\| [OperatorMap](../../../types/tax.OperatorMap/page.mdx)<number> \\| `number`[]","description":"Filter the tax rates by their rate.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string` \\| `string`[] \\| [OperatorMap](../../../types/tax.OperatorMap/page.mdx)<string>","description":"Filter the tax rates by their code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string` \\| `string`[] \\| [OperatorMap](../../../types/tax.OperatorMap/page.mdx)<string>","description":"Filter the tax rates by their name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"[OperatorMap](../../../types/tax.OperatorMap/page.mdx)<string>","description":"Filter the tax rates by their creation date.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"[OperatorMap](../../../types/tax.OperatorMap/page.mdx)<string>","description":"Filter the tax rates by their update date.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`string` \\| `string`[] \\| [OperatorMap](../../../types/tax.OperatorMap/page.mdx)<string>","description":"Filter the tax rates by who created it.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../../../interfaces/tax.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../../../interfaces/tax.BaseFilterable/page.mdx)<T> \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([FilterableTaxRateProps](../../../interfaces/tax.FilterableTaxRateProps/page.mdx) \\| [BaseFilterable](../../../interfaces/tax.BaseFilterable/page.mdx)<[FilterableTaxRateProps](../../../interfaces/tax.FilterableTaxRateProps/page.mdx)>)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableTaxRateProps](../../../interfaces/tax.FilterableTaxRateProps/page.mdx) \\| [BaseFilterable](../../../interfaces/tax.BaseFilterable/page.mdx)<[FilterableTaxRateProps](../../../interfaces/tax.FilterableTaxRateProps/page.mdx)>)[]","description":"An Line truncated
|
||||
|
||||
### Returns
|
||||
|
||||
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
---
|
||||
displayed_sidebar: taxReference
|
||||
slug: /references/tax/updateTaxRegions
|
||||
sidebar_label: updateTaxRegions
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# updateTaxRegions - Tax Module Reference
|
||||
|
||||
This documentation provides a reference to the `updateTaxRegions` method. This belongs to the Tax Module.
|
||||
|
||||
<Note>
|
||||
|
||||
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
|
||||
|
||||
</Note>
|
||||
|
||||
## updateTaxRegions(data, sharedContext?): Promise<[TaxRegionDTO](../../../interfaces/tax.TaxRegionDTO/page.mdx)>
|
||||
|
||||
This method updates a tax region.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
const taxRegion = await taxModule.updateTaxRegions({
|
||||
province_code: "be",
|
||||
})
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[UpdateTaxRegionDTO](../../../interfaces/tax.UpdateTaxRegionDTO/page.mdx)","description":"The tax region to be updated.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The id of the tax region to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"province_code","type":"`null` \\| `string`","description":"The province code of the tax region.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../../types/tax.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/tax.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/tax.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateTaxRegions"/>
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[TaxRegionDTO](../../../interfaces/tax.TaxRegionDTO/page.mdx)>","optional":false,"defaultValue":"","description":"The updated tax region.","expandable":false,"children":[{"name":"TaxRegionDTO","type":"[TaxRegionDTO](../../../interfaces/tax.TaxRegionDTO/page.mdx)","optional":false,"defaultValue":"","description":"The tax region details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the tax region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The ISO 2 character country code of the tax region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"province_code","type":"`null` \\| `string`","description":"The province code of the tax region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_id","type":"`null` \\| `string`","description":"The ID of the tax region's parent tax region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the tax region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the tax region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"Who created the tax region. For example, the ID of the user\nthat created the tax region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The deletion date of the tax region.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateTaxRegions"/>
|
||||
|
||||
## updateTaxRegions(data, sharedContext?): Promise<[TaxRegionDTO](../../../interfaces/tax.TaxRegionDTO/page.mdx)[]>
|
||||
|
||||
This method updates tax regions.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
const taxRegions = await taxModule.updateTaxRegions([
|
||||
{
|
||||
id: "tx-1",
|
||||
province_code: "be",
|
||||
},
|
||||
{
|
||||
id: "tx-2",
|
||||
province_code: "ca",
|
||||
},
|
||||
])
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"data","type":"[UpdateTaxRegionDTO](../../../interfaces/tax.UpdateTaxRegionDTO/page.mdx)[]","description":"The tax regions to be updated.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The id of the tax region to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"province_code","type":"`null` \\| `string`","description":"The province code of the tax region.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../../types/tax.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/tax.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/tax.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateTaxRegions"/>
|
||||
|
||||
### Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[TaxRegionDTO](../../../interfaces/tax.TaxRegionDTO/page.mdx)[]>","optional":false,"defaultValue":"","description":"The updated tax regions.","expandable":false,"children":[{"name":"TaxRegionDTO[]","type":"[TaxRegionDTO](../../../interfaces/tax.TaxRegionDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"TaxRegionDTO","type":"`object`","description":"The tax region details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateTaxRegions"/>
|
||||
+6
@@ -10,6 +10,12 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
This documentation provides a reference to the `upsertTaxRates` method. This belongs to the Tax Module.
|
||||
|
||||
<Note>
|
||||
|
||||
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
|
||||
|
||||
</Note>
|
||||
|
||||
## upsertTaxRates(data, sharedContext?): Promise<[TaxRateDTO](../../../interfaces/tax.TaxRateDTO/page.mdx)>
|
||||
|
||||
This method updates or creates a tax rate if it doesn't exist.
|
||||
|
||||
@@ -9,6 +9,12 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
This section of the documentation provides a reference to the `ITaxModuleService` interface’s methods. This is the interface developers use to use the functionalities provided by the Tax Module.
|
||||
|
||||
<Note>
|
||||
|
||||
You should only use the methods in this reference when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
|
||||
|
||||
</Note>
|
||||
|
||||
The main service interface for the Tax Module.
|
||||
|
||||
## Methods
|
||||
@@ -22,6 +28,7 @@ The main service interface for the Tax Module.
|
||||
- [deleteTaxRates](../../ITaxModuleService/methods/tax.ITaxModuleService.deleteTaxRates/page.mdx)
|
||||
- [restoreTaxRates](../../ITaxModuleService/methods/tax.ITaxModuleService.restoreTaxRates/page.mdx)
|
||||
- [createTaxRegions](../../ITaxModuleService/methods/tax.ITaxModuleService.createTaxRegions/page.mdx)
|
||||
- [updateTaxRegions](../../ITaxModuleService/methods/tax.ITaxModuleService.updateTaxRegions/page.mdx)
|
||||
- [deleteTaxRegions](../../ITaxModuleService/methods/tax.ITaxModuleService.deleteTaxRegions/page.mdx)
|
||||
- [listTaxRegions](../../ITaxModuleService/methods/tax.ITaxModuleService.listTaxRegions/page.mdx)
|
||||
- [createTaxRateRules](../../ITaxModuleService/methods/tax.ITaxModuleService.createTaxRateRules/page.mdx)
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
---
|
||||
displayed_sidebar: taxReference
|
||||
---
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# UpdateTaxRegionDTO
|
||||
|
||||
The tax region to be updated.
|
||||
|
||||
<TypeList types={[{"name":"id","type":"`string`","description":"The id of the tax region to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"province_code","type":"`null` \\| `string`","description":"The province code of the tax region.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../types/tax.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="UpdateTaxRegionDTO"/>
|
||||
@@ -8,6 +8,4 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
**BigNumberRawValue**: `Object`
|
||||
|
||||
## Properties
|
||||
|
||||
<TypeList types={[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="BigNumberRawValue"/>
|
||||
@@ -8,6 +8,4 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
**Event**: `Object`
|
||||
|
||||
## Properties
|
||||
|
||||
<TypeList types={[{"name":"name","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"TData","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[EventMetadata](../tax.EventMetadata/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"eventGroupId","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="Event"/>
|
||||
@@ -8,6 +8,4 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
**JoinerRelationship**: `Object`
|
||||
|
||||
## Properties
|
||||
|
||||
<TypeList types={[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record<string, any>`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="JoinerRelationship"/>
|
||||
@@ -8,6 +8,4 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
**OperatorMap**: `Object`
|
||||
|
||||
## Properties
|
||||
|
||||
<TypeList types={[{"name":"$and","type":"[Query](../tax.Query/page.mdx)<T>[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"[Query](../tax.Query/page.mdx)<T>[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$eq","type":"[ExpandScalar](../tax.ExpandScalar/page.mdx)<T> \\| [ExpandScalar](../tax.ExpandScalar/page.mdx)<T>[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ne","type":"[ExpandScalar](../tax.ExpandScalar/page.mdx)<T>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$in","type":"[ExpandScalar](../tax.ExpandScalar/page.mdx)<T>[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$nin","type":"[ExpandScalar](../tax.ExpandScalar/page.mdx)<T>[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$not","type":"[Query](../tax.Query/page.mdx)<T>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gt","type":"[ExpandScalar](../tax.ExpandScalar/page.mdx)<T>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gte","type":"[ExpandScalar](../tax.ExpandScalar/page.mdx)<T>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lt","type":"[ExpandScalar](../tax.ExpandScalar/page.mdx)<T>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lte","type":"[ExpandScalar](../tax.ExpandScalar/page.mdx)<T>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$like","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$re","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ilike","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$fulltext","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$overlap","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$contains","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$contained","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$exists","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="OperatorMap"/>
|
||||
@@ -8,6 +8,4 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
**RawMessageFormat**: `Object`
|
||||
|
||||
## Properties
|
||||
|
||||
<TypeList types={[{"name":"eventName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"TData","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"source","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"object","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"action","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"Pick<[Context](../../interfaces/tax.Context/page.mdx), \"eventGroupId\">","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"options","type":"`Record<string, any>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="RawMessageFormat"/>
|
||||
Reference in new issue
Block a user