chore(docs): Generated References (automated) (#12154)
Generated the following references: - `api_key` - `auth` - `cart` - `cart_models` - `core_flows` - `currency` - `customer` - `event` - `file_service` - `fulfillment` - `fulfillment_provider` - `inventory_next` - `js_sdk` - `locking` - `medusa` - `modules` - `modules_sdk` - `notification_service` - `order` - `payment` - `payment_provider` - `pricing` - `product` - `promotion` - `region` - `sales_channel` - `stock_location_next` - `store` - `tax` - `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:
1790 files changed
+220057
-187216
No files matched your search
+20
-2
@@ -2,10 +2,28 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
# create
|
||||
|
||||
This method creates a tax rate. It sends a request to the
|
||||
[Create Tax Rate](https://docs.medusajs.com/api/admin#tax-rates\_posttaxrates)
|
||||
API route.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
sdk.admin.taxRate.create({
|
||||
name: "VAT",
|
||||
tax_region_id: "txreg_123",
|
||||
code: "VAT",
|
||||
rate: 2, // 2%
|
||||
})
|
||||
.then(({ tax_rate }) => {
|
||||
console.log(tax_rate)
|
||||
})
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"body","type":"[AdminCreateTaxRate](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreateTaxRate/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_region_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[AdminCreateTaxRateRule](../../../../../types/interfaces/types.AdminCreateTaxRateRule/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"reference","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"is_default","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_combinable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="create"/>
|
||||
<TypeList types={[{"name":"body","type":"[AdminCreateTaxRate](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreateTaxRate/page.mdx)","description":"The details of the tax rate to create.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The name of the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_region_id","type":"`string`","description":"The ID of the tax region associated with the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The code of the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`number`","description":"The rate of the tax rate.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[AdminCreateTaxRateRule](../../../../../types/interfaces/types.AdminCreateTaxRateRule/page.mdx)[]","description":"The rules of the tax rate.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"reference","type":"`string`","description":"The name of the table that the rule references.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference_id","type":"`string`","description":"The ID of the record in the table that the rule references.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"is_default","type":"`boolean`","description":"Whether the tax rate is the default tax rate in its tax region.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_combinable","type":"`boolean`","description":"Whether the tax rate is combinable with other tax rates.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Custom key-value pairs that can be added to the tax rate.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields and relations to retrieve in the tax rate.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="create"/>
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[AdminTaxRateResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateResponse/page.mdx)>","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"tax_rate","type":"[AdminTaxRate](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRate/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`null` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_region_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_combinable","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_region","type":"[AdminTaxRegion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRegion/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[AdminTaxRateRule](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateRule/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="create"/>
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[AdminTaxRateResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateResponse/page.mdx)>","optional":false,"defaultValue":"","description":"The tax rate's details.","expandable":false,"children":[{"name":"tax_rate","type":"[AdminTaxRate](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRate/page.mdx)","description":"The tax rate's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The tax rate's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`null` \\| `number`","description":"The tax rate's percentage rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The tax rate's code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The tax rate's name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Custom key-value pairs that can be added to the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_region_id","type":"`string`","description":"The ID of the tax region associated with the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_combinable","type":"`boolean`","description":"Whether the tax rate is combinable with other tax rates.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default","type":"`boolean`","description":"Whether the tax rate is the default tax rate in its tax region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date the tax rate was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The date the tax rate was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null`","description":"The date the tax rate was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"The ID of the user who created the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_region","type":"[AdminTaxRegion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRegion/page.mdx)","description":"The tax region associated with the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[AdminTaxRateRule](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateRule/page.mdx)[]","description":"The rules associated with the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="create"/>
|
||||
+15
-2
@@ -2,10 +2,23 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
# delete
|
||||
|
||||
This method deletes a tax rate. It sends a request to the
|
||||
[Delete Tax Rate](https://docs.medusajs.com/api/admin#tax-rates\_deletetaxratesid)
|
||||
API route.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
sdk.admin.taxRate.delete("txrat_123")
|
||||
.then(({ deleted }) => {
|
||||
console.log(deleted)
|
||||
})
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
|
||||
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the tax rate to delete.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[AdminTaxRateDeleteResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateDeleteResponse/page.mdx)>","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"object","type":"`\"tax_rate\"`","description":"The type of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted","type":"`boolean`","description":"Whether the item was deleted successfully.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[AdminTaxRateDeleteResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateDeleteResponse/page.mdx)>","optional":false,"defaultValue":"","description":"The deletion's details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"object","type":"`\"tax_rate\"`","description":"The type of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted","type":"`boolean`","description":"Whether the item was deleted successfully.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
|
||||
+45
-2
@@ -2,10 +2,53 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
# list
|
||||
|
||||
This method retrieves a list of tax rates. It sends a request to the
|
||||
[List Tax Rates](https://docs.medusajs.com/api/admin#tax-rates\_gettaxrates)
|
||||
API route.
|
||||
|
||||
## Example
|
||||
|
||||
To retrieve the list of tax rates:
|
||||
|
||||
```ts
|
||||
sdk.admin.taxRate.list()
|
||||
.then(({ tax_rates, count, limit, offset }) => {
|
||||
console.log(tax_rates)
|
||||
})
|
||||
```
|
||||
|
||||
To configure the pagination, pass the `limit` and `offset` query parameters.
|
||||
|
||||
For example, to retrieve only 10 items and skip 10 items:
|
||||
|
||||
```ts
|
||||
sdk.admin.taxRate.list({
|
||||
limit: 10,
|
||||
offset: 10
|
||||
})
|
||||
.then(({ tax_rates, count, limit, offset }) => {
|
||||
console.log(tax_rates)
|
||||
})
|
||||
```
|
||||
|
||||
Using the `fields` query parameter, you can specify the fields and relations to retrieve
|
||||
in each tax rate:
|
||||
|
||||
```ts
|
||||
sdk.admin.taxRate.list({
|
||||
fields: "id,*tax_region"
|
||||
})
|
||||
.then(({ tax_rates, count, limit, offset }) => {
|
||||
console.log(tax_rates)
|
||||
})
|
||||
```
|
||||
|
||||
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/admin#select-fields-and-relations).
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"query","type":"[AdminTaxRateListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateListParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([AdminTaxRateListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)<[AdminTaxRateListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateListParams/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":"([AdminTaxRateListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)<[AdminTaxRateListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateListParams/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":"([AdminTaxRateListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)<[AdminTaxRateListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateListParams/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":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_region_id","type":"`string` \\| `string`[] \\| [OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)<string \\| string[]>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default","type":"`\"true\"` \\| `\"false\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_profile_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option_type_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)<string>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)<string>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)<string>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([AdminTaxRateListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)<[AdminTaxRateListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateListParams/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":"([AdminTaxRateListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypesLine truncated
|
||||
<TypeList types={[{"name":"query","type":"[AdminTaxRateListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateListParams/page.mdx)","description":"Filters and pagination configurations.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([AdminTaxRateListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)<[AdminTaxRateListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateListParams/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":"([AdminTaxRateListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)<[AdminTaxRateListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateListParams/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":"([AdminTaxRateListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)<[AdminTaxRateListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateListParams/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":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"Query or keywords to search the tax rate's searchable fields.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_region_id","type":"`string` \\| `string`[] \\| [OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)<string \\| string[]>","description":"Filter by tax region ID(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default","type":"`\"true\"` \\| `\"false\"`","description":"Filter by whether the tax rate is the default tax rate in its tax region.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone_id","type":"`string`","description":"Filter by service zone ID(s) to retrieve tax rates that are associated with the service zones.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_profile_id","type":"`string`","description":"Filter by shipping profile ID(s) to retrieve tax rates that are associated with the shipping profiles.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"Filter by tax provider ID(s) to retrieve tax rates that are associated with the providers.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option_type_id","type":"`string`","description":"Filter by shipping option type ID(s) to retrieve tax rates that are associated with the shipping option types.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)<string>","description":"Filter by the date the tax rate was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)<string>","description":"Filter by the date the tax rate was updated.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)<string>","description":"Filter by the date the tax rate was deleted."Line truncated
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[AdminTaxRateListResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminTaxRateListResponse/page.mdx)>","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"limit","type":"`number`","description":"The maximum number of items retrieved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"count","type":"`number`","description":"The total number of items.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="list"/>
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[AdminTaxRateListResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminTaxRateListResponse/page.mdx)>","optional":false,"defaultValue":"","description":"The list of tax rates.","expandable":false,"children":[{"name":"limit","type":"`number`","description":"The maximum number of items retrieved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"count","type":"`number`","description":"The total number of items.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="list"/>
|
||||
+30
-2
@@ -2,10 +2,38 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
# retrieve
|
||||
|
||||
This method retrieves a tax rate. It sends a request to the
|
||||
[Get Tax Rate](https://docs.medusajs.com/api/admin#tax-rates\_gettaxratesid)
|
||||
API route.
|
||||
|
||||
## Example
|
||||
|
||||
To retrieve a tax rate by its ID:
|
||||
|
||||
```ts
|
||||
sdk.admin.taxRate.retrieve("txrat_123")
|
||||
.then(({ tax_rate }) => {
|
||||
console.log(tax_rate)
|
||||
})
|
||||
```
|
||||
|
||||
To specify the fields and relations to retrieve:
|
||||
|
||||
```ts
|
||||
sdk.admin.taxRate.retrieve("txrat_123", {
|
||||
fields: "id,*tax_region"
|
||||
})
|
||||
.then(({ tax_rate }) => {
|
||||
console.log(tax_rate)
|
||||
})
|
||||
```
|
||||
|
||||
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/admin#select-fields-and-relations).
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
|
||||
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the tax rate to retrieve.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields and relations to retrieve in the tax rate.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[AdminTaxRateResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateResponse/page.mdx)>","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"tax_rate","type":"[AdminTaxRate](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRate/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`null` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_region_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_combinable","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_region","type":"[AdminTaxRegion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRegion/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[AdminTaxRateRule](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateRule/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[AdminTaxRateResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateResponse/page.mdx)>","optional":false,"defaultValue":"","description":"The tax rate's details.","expandable":false,"children":[{"name":"tax_rate","type":"[AdminTaxRate](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRate/page.mdx)","description":"The tax rate's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The tax rate's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`null` \\| `number`","description":"The tax rate's percentage rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The tax rate's code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The tax rate's name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Custom key-value pairs that can be added to the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_region_id","type":"`string`","description":"The ID of the tax region associated with the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_combinable","type":"`boolean`","description":"Whether the tax rate is combinable with other tax rates.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default","type":"`boolean`","description":"Whether the tax rate is the default tax rate in its tax region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date the tax rate was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The date the tax rate was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null`","description":"The date the tax rate was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"The ID of the user who created the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_region","type":"[AdminTaxRegion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRegion/page.mdx)","description":"The tax region associated with the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[AdminTaxRateRule](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateRule/page.mdx)[]","description":"The rules associated with the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
|
||||
+18
-2
@@ -2,10 +2,26 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
# update
|
||||
|
||||
This method updates a tax rate. It sends a request to the
|
||||
[Update Tax Rate](https://docs.medusajs.com/api/admin#tax-rates\_posttaxratesid)
|
||||
API route.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
sdk.admin.taxRate.update("txrat_123", {
|
||||
name: "VAT",
|
||||
code: "VAT",
|
||||
})
|
||||
.then(({ tax_rate }) => {
|
||||
console.log(tax_rate)
|
||||
})
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateTaxRate](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateTaxRate/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[AdminCreateTaxRateRule](../../../../../types/interfaces/types.AdminCreateTaxRateRule/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"reference","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"is_default","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_combinable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="update"/>
|
||||
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the tax rate to update.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateTaxRate](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateTaxRate/page.mdx)","description":"The details of the tax rate to update.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"The code of the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the tax rate.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`number`","description":"The percentage rate of the tax rate.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[AdminCreateTaxRateRule](../../../../../types/interfaces/types.AdminCreateTaxRateRule/page.mdx)[]","description":"The rules of the tax rate.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"reference","type":"`string`","description":"The name of the table that the rule references.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference_id","type":"`string`","description":"The ID of the record in the table that the rule references.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"is_default","type":"`boolean`","description":"Whether the tax rate is the default tax rate in its tax region.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_combinable","type":"`boolean`","description":"Whether the tax rate is combinable with other tax rates.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Custom key-value pairs that can be added to the tax rate.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields and relations to retrieve in the tax rate.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="update"/>
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[AdminTaxRateResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateResponse/page.mdx)>","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"tax_rate","type":"[AdminTaxRate](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRate/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`null` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_region_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_combinable","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_region","type":"[AdminTaxRegion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRegion/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[AdminTaxRateRule](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateRule/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="update"/>
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[AdminTaxRateResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateResponse/page.mdx)>","optional":false,"defaultValue":"","description":"The tax rate's details.","expandable":false,"children":[{"name":"tax_rate","type":"[AdminTaxRate](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRate/page.mdx)","description":"The tax rate's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The tax rate's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`null` \\| `number`","description":"The tax rate's percentage rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The tax rate's code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The tax rate's name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Custom key-value pairs that can be added to the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_region_id","type":"`string`","description":"The ID of the tax region associated with the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_combinable","type":"`boolean`","description":"Whether the tax rate is combinable with other tax rates.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default","type":"`boolean`","description":"Whether the tax rate is the default tax rate in its tax region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date the tax rate was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The date the tax rate was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null`","description":"The date the tax rate was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"The ID of the user who created the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_region","type":"[AdminTaxRegion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRegion/page.mdx)","description":"The tax region associated with the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[AdminTaxRateRule](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateRule/page.mdx)[]","description":"The rules associated with the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="update"/>
|
||||
Reference in new issue
Block a user