|
1
|
{"slug":"/references/tax/models/TaxRegion","title":"TaxRegion - Tax Module Data Models Reference","frontmatter":{"displayed_sidebar":"taxModelReference","slug":"/references/tax/models/TaxRegion","sidebar_label":"TaxRegion"},"toc":[],"blocks":[{"kind":"markdown","html":"This documentation provides a reference to the TaxRegion data model. It belongs to the Tax Module."},{"kind":"sourceCodeLink","link":"https://github.com/medusajs/medusa/blob/020565398e436a2bc65777a3b1ad347b4735d6df/packages/modules/tax/src/models/tax-region.ts#L10"},{"kind":"typeList","sectionTitle":"TaxRegion","types":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the tax region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The country code of the tax region.","optional":false,"defaultValue":"","example":"us","expandable":false,"children":[{"name":"$dataType","type":"`string`","description":"A type-only property to infer the JavaScript data-type\nof the schema property","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"#retrievable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#providerOptions","type":"`Record<string, Record<string, unknown>>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#filterable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#sortable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#facetable","type":"`boolean` \\| `object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"types","type":"[SearchFacetKind](/references/types/SearchTypes/types/types.SearchTypes.SearchFacetKind)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"#array","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#searchable","type":"`boolean` \\| `object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"weight","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"dataType","type":"`object`","description":"The runtime dataType for the schema. It is not the same as\nthe \"$dataType\".","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`\"text\"`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record<string, any>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"province_code","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The province code of the tax region","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$dataType","type":"`string`","description":"A type-only property to infer the JavaScript data-type\nof the schema property","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"#retrievable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#providerOptions","type":"`Record<string, Record<string, unknown>>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#filterable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#sortable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#facetable","type":"`boolean` \\| `object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"types","type":"[SearchFacetKind](/references/types/SearchTypes/types/types.SearchTypes.SearchFacetKind)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"#array","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#searchable","type":"`boolean` \\| `object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"weight","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"dataType","type":"`object`","description":"The runtime dataType for the schema. It is not the same as\nthe \"$dataType\".","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`\"text\"`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record<string, any>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"metadata","type":"JSONProperty<NoInfer<Record<string, unknown>>>","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The ID of the user that created the tax region","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$dataType","type":"`string`","description":"A type-only property to infer the JavaScript data-type\nof the schema property","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"#retrievable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#providerOptions","type":"`Record<string, Record<string, unknown>>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#filterable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#sortable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#facetable","type":"`boolean` \\| `object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"types","type":"[SearchFacetKind](/references/types/SearchTypes/types/types.SearchTypes.SearchFacetKind)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"#array","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#searchable","type":"`boolean` \\| `object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"weight","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"dataType","type":"`object`","description":"The runtime dataType for the schema. It is not the same as\nthe \"$dataType\".","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`\"text\"`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record<string, any>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"provider","type":"BelongsTo<[TaxProvider](/references/tax/models/TaxProvider)>","description":"The provider that calculates taxes in this region.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the tax provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_enabled","type":"[BooleanProperty](/references/utils/classes/utils.BooleanProperty)","description":"Whether the tax provider is enabled.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"$dataType","type":"`boolean`","description":"A type-only property to infer the JavaScript data-type\nof the schema property","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"#retrievable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#providerOptions","type":"`Record<string, Record<string, unknown>>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#filterable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#sortable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#facetable","type":"`boolean` \\| `object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#array","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"dataType","type":"`object`","description":"The runtime dataType for the schema. It is not the same as\nthe \"$dataType\".","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"regions","type":"HasMany<[TaxRegion](/references/tax/models/TaxRegion)>","description":"The regions that use this provider to calculate taxes.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the tax region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The country code of the tax region.","optional":false,"defaultValue":"","example":"us","expandable":false,"children":[]},{"name":"province_code","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The province code of the tax region","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"JSONProperty<NoInfer<Record<string, unknown>>>","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The ID of the user that created the tax region","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"BelongsTo<[TaxProvider](/references/tax/models/TaxProvider)>","description":"The provider that calculates taxes in this region.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"parent","type":"BelongsTo<[TaxRegion](/references/tax/models/TaxRegion)>","description":"The tax region's parent.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"children","type":"HasMany<[TaxRegion](/references/tax/models/TaxRegion)>","description":"The tax region's children..","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"tax_rates","type":"HasMany<[TaxRate](/references/tax/models/TaxRate)>","description":"The associated tax rates.","optional":false,"defaultValue":"","expandable":true,"children":[]}]}]},{"name":"parent","type":"BelongsTo<[TaxRegion](/references/tax/models/TaxRegion)>","description":"The tax region's parent.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the tax region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The country code of the tax region.","optional":false,"defaultValue":"","example":"us","expandable":false,"children":[{"name":"$dataType","type":"`string`","description":"A type-only property to infer the JavaScript data-type\nof the schema property","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"#retrievable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#providerOptions","type":"`Record<string, Record<string, unknown>>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#filterable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#sortable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#facetable","type":"`boolean` \\| `object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#array","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#searchable","type":"`boolean` \\| `object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"dataType","type":"`object`","description":"The runtime dataType for the schema. It is not the same as\nthe \"$dataType\".","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"province_code","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The province code of the tax region","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$dataType","type":"`string`","description":"A type-only property to infer the JavaScript data-type\nof the schema property","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"#retrievable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#providerOptions","type":"`Record<string, Record<string, unknown>>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#filterable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#sortable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#facetable","type":"`boolean` \\| `object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#array","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#searchable","type":"`boolean` \\| `object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"dataType","type":"`object`","description":"The runtime dataType for the schema. It is not the same as\nthe \"$dataType\".","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"JSONProperty<NoInfer<Record<string, unknown>>>","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The ID of the user that created the tax region","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$dataType","type":"`string`","description":"A type-only property to infer the JavaScript data-type\nof the schema property","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"#retrievable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#providerOptions","type":"`Record<string, Record<string, unknown>>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#filterable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#sortable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#facetable","type":"`boolean` \\| `object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#array","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#searchable","type":"`boolean` \\| `object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"dataType","type":"`object`","description":"The runtime dataType for the schema. It is not the same as\nthe \"$dataType\".","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"provider","type":"BelongsTo<[TaxProvider](/references/tax/models/TaxProvider)>","description":"The provider that calculates taxes in this region.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the tax provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_enabled","type":"[BooleanProperty](/references/utils/classes/utils.BooleanProperty)","description":"Whether the tax provider is enabled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"regions","type":"HasMany<[TaxRegion](/references/tax/models/TaxRegion)>","description":"The regions that use this provider to calculate taxes.","optional":false,"defaultValue":"","expandable":true,"children":[]}]},{"name":"parent","type":"BelongsTo<[TaxRegion](/references/tax/models/TaxRegion)>","description":"The tax region's parent.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the tax region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The country code of the tax region.","optional":false,"defaultValue":"","example":"us","expandable":false,"children":[]},{"name":"province_code","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The province code of the tax region","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"JSONProperty<NoInfer<Record<string, unknown>>>","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The ID of the user that created the tax region","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"BelongsTo<[TaxProvider](/references/tax/models/TaxProvider)>","description":"The provider that calculates taxes in this region.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"parent","type":"BelongsTo<[TaxRegion](/references/tax/models/TaxRegion)>","description":"The tax region's parent.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"children","type":"HasMany<[TaxRegion](/references/tax/models/TaxRegion)>","description":"The tax region's children..","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"tax_rates","type":"HasMany<[TaxRate](/references/tax/models/TaxRate)>","description":"The associated tax rates.","optional":false,"defaultValue":"","expandable":true,"children":[]}]},{"name":"children","type":"HasMany<[TaxRegion](/references/tax/models/TaxRegion)>","description":"The tax region's children..","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the tax region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The country code of the tax region.","optional":false,"defaultValue":"","example":"us","expandable":false,"children":[]},{"name":"province_code","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The province code of the tax region","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"JSONProperty<NoInfer<Record<string, unknown>>>","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The ID of the user that created the tax region","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"BelongsTo<[TaxProvider](/references/tax/models/TaxProvider)>","description":"The provider that calculates taxes in this region.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"parent","type":"BelongsTo<[TaxRegion](/references/tax/models/TaxRegion)>","description":"The tax region's parent.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"children","type":"HasMany<[TaxRegion](/references/tax/models/TaxRegion)>","description":"The tax region's children..","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"tax_rates","type":"HasMany<[TaxRate](/references/tax/models/TaxRate)>","description":"The associated tax rates.","optional":false,"defaultValue":"","expandable":true,"children":[]}]},{"name":"tax_rates","type":"HasMany<[TaxRate](/references/tax/models/TaxRate)>","description":"The associated tax rates.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"[FloatProperty](/references/utils/classes/utils.FloatProperty)","description":"The rate to charge.","optional":true,"defaultValue":"","example":"10","expandable":false,"children":[]},{"name":"code","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The code the tax rate is identified by.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The name of the tax rate","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default","type":"[BooleanProperty](/references/utils/classes/utils.BooleanProperty)","description":"Whether this tax rate is the default in the tax region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_combinable","type":"[BooleanProperty](/references/utils/classes/utils.BooleanProperty)","description":"Whether the tax rate should be combined with parent rates. Learn more in [this documentation](https://docs.medusajs.com/v2/resources/commerce-modules/tax/tax-rates-and-rules#combinable-tax-rates).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_region","type":"BelongsTo<[TaxRegion](/references/tax/models/TaxRegion)>","description":"The associated tax region.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"rules","type":"HasMany<[TaxRateRule](/references/tax/models/TaxRateRule)>","description":"The associated rules.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"metadata","type":"JSONProperty<NoInfer<Record<string, unknown>>>","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The ID of the user that created the tax rate","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"children","type":"HasMany<[TaxRegion](/references/tax/models/TaxRegion)>","description":"The tax region's children..","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the tax region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The country code of the tax region.","optional":false,"defaultValue":"","example":"us","expandable":false,"children":[{"name":"$dataType","type":"`string`","description":"A type-only property to infer the JavaScript data-type\nof the schema property","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"#retrievable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#providerOptions","type":"`Record<string, Record<string, unknown>>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#filterable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#sortable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#facetable","type":"`boolean` \\| `object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#array","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#searchable","type":"`boolean` \\| `object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"dataType","type":"`object`","description":"The runtime dataType for the schema. It is not the same as\nthe \"$dataType\".","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"province_code","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The province code of the tax region","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$dataType","type":"`string`","description":"A type-only property to infer the JavaScript data-type\nof the schema property","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"#retrievable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#providerOptions","type":"`Record<string, Record<string, unknown>>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#filterable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#sortable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#facetable","type":"`boolean` \\| `object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#array","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#searchable","type":"`boolean` \\| `object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"dataType","type":"`object`","description":"The runtime dataType for the schema. It is not the same as\nthe \"$dataType\".","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"JSONProperty<NoInfer<Record<string, unknown>>>","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The ID of the user that created the tax region","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$dataType","type":"`string`","description":"A type-only property to infer the JavaScript data-type\nof the schema property","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"#retrievable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#providerOptions","type":"`Record<string, Record<string, unknown>>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#filterable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#sortable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#facetable","type":"`boolean` \\| `object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#array","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#searchable","type":"`boolean` \\| `object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"dataType","type":"`object`","description":"The runtime dataType for the schema. It is not the same as\nthe \"$dataType\".","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"provider","type":"BelongsTo<[TaxProvider](/references/tax/models/TaxProvider)>","description":"The provider that calculates taxes in this region.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the tax provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_enabled","type":"[BooleanProperty](/references/utils/classes/utils.BooleanProperty)","description":"Whether the tax provider is enabled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"regions","type":"HasMany<[TaxRegion](/references/tax/models/TaxRegion)>","description":"The regions that use this provider to calculate taxes.","optional":false,"defaultValue":"","expandable":true,"children":[]}]},{"name":"parent","type":"BelongsTo<[TaxRegion](/references/tax/models/TaxRegion)>","description":"The tax region's parent.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the tax region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The country code of the tax region.","optional":false,"defaultValue":"","example":"us","expandable":false,"children":[]},{"name":"province_code","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The province code of the tax region","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"JSONProperty<NoInfer<Record<string, unknown>>>","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The ID of the user that created the tax region","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"BelongsTo<[TaxProvider](/references/tax/models/TaxProvider)>","description":"The provider that calculates taxes in this region.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"parent","type":"BelongsTo<[TaxRegion](/references/tax/models/TaxRegion)>","description":"The tax region's parent.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"children","type":"HasMany<[TaxRegion](/references/tax/models/TaxRegion)>","description":"The tax region's children..","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"tax_rates","type":"HasMany<[TaxRate](/references/tax/models/TaxRate)>","description":"The associated tax rates.","optional":false,"defaultValue":"","expandable":true,"children":[]}]},{"name":"children","type":"HasMany<[TaxRegion](/references/tax/models/TaxRegion)>","description":"The tax region's children..","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the tax region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The country code of the tax region.","optional":false,"defaultValue":"","example":"us","expandable":false,"children":[]},{"name":"province_code","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The province code of the tax region","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"JSONProperty<NoInfer<Record<string, unknown>>>","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The ID of the user that created the tax region","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"BelongsTo<[TaxProvider](/references/tax/models/TaxProvider)>","description":"The provider that calculates taxes in this region.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"parent","type":"BelongsTo<[TaxRegion](/references/tax/models/TaxRegion)>","description":"The tax region's parent.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"children","type":"HasMany<[TaxRegion](/references/tax/models/TaxRegion)>","description":"The tax region's children..","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"tax_rates","type":"HasMany<[TaxRate](/references/tax/models/TaxRate)>","description":"The associated tax rates.","optional":false,"defaultValue":"","expandable":true,"children":[]}]},{"name":"tax_rates","type":"HasMany<[TaxRate](/references/tax/models/TaxRate)>","description":"The associated tax rates.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"[FloatProperty](/references/utils/classes/utils.FloatProperty)","description":"The rate to charge.","optional":true,"defaultValue":"","example":"10","expandable":false,"children":[]},{"name":"code","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The code the tax rate is identified by.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The name of the tax rate","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default","type":"[BooleanProperty](/references/utils/classes/utils.BooleanProperty)","description":"Whether this tax rate is the default in the tax region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_combinable","type":"[BooleanProperty](/references/utils/classes/utils.BooleanProperty)","description":"Whether the tax rate should be combined with parent rates. Learn more in [this documentation](https://docs.medusajs.com/v2/resources/commerce-modules/tax/tax-rates-and-rules#combinable-tax-rates).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_region","type":"BelongsTo<[TaxRegion](/references/tax/models/TaxRegion)>","description":"The associated tax region.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"rules","type":"HasMany<[TaxRateRule](/references/tax/models/TaxRateRule)>","description":"The associated rules.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"metadata","type":"JSONProperty<NoInfer<Record<string, unknown>>>","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The ID of the user that created the tax rate","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"tax_rates","type":"HasMany<[TaxRate](/references/tax/models/TaxRate)>","description":"The associated tax rates.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"[FloatProperty](/references/utils/classes/utils.FloatProperty)","description":"The rate to charge.","optional":true,"defaultValue":"","example":"10","expandable":false,"children":[{"name":"$dataType","type":"`number`","description":"A type-only property to infer the JavaScript data-type\nof the schema property","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"#retrievable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#providerOptions","type":"`Record<string, Record<string, unknown>>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#filterable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#sortable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#facetable","type":"`boolean` \\| `object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#array","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"dataType","type":"`object`","description":"The runtime dataType for the schema. It is not the same as\nthe \"$dataType\".","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"code","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The code the tax rate is identified by.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"$dataType","type":"`string`","description":"A type-only property to infer the JavaScript data-type\nof the schema property","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"#retrievable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#providerOptions","type":"`Record<string, Record<string, unknown>>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#filterable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#sortable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#facetable","type":"`boolean` \\| `object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#array","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#searchable","type":"`boolean` \\| `object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"dataType","type":"`object`","description":"The runtime dataType for the schema. It is not the same as\nthe \"$dataType\".","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"name","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The name of the tax rate","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"$dataType","type":"`string`","description":"A type-only property to infer the JavaScript data-type\nof the schema property","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"#retrievable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#providerOptions","type":"`Record<string, Record<string, unknown>>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#filterable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#sortable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#facetable","type":"`boolean` \\| `object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#array","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#searchable","type":"`boolean` \\| `object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"dataType","type":"`object`","description":"The runtime dataType for the schema. It is not the same as\nthe \"$dataType\".","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"is_default","type":"[BooleanProperty](/references/utils/classes/utils.BooleanProperty)","description":"Whether this tax rate is the default in the tax region.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"$dataType","type":"`boolean`","description":"A type-only property to infer the JavaScript data-type\nof the schema property","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"#retrievable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#providerOptions","type":"`Record<string, Record<string, unknown>>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#filterable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#sortable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#facetable","type":"`boolean` \\| `object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#array","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"dataType","type":"`object`","description":"The runtime dataType for the schema. It is not the same as\nthe \"$dataType\".","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"is_combinable","type":"[BooleanProperty](/references/utils/classes/utils.BooleanProperty)","description":"Whether the tax rate should be combined with parent rates. Learn more in [this documentation](https://docs.medusajs.com/v2/resources/commerce-modules/tax/tax-rates-and-rules#combinable-tax-rates).","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"$dataType","type":"`boolean`","description":"A type-only property to infer the JavaScript data-type\nof the schema property","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"#retrievable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#providerOptions","type":"`Record<string, Record<string, unknown>>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#filterable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#sortable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#facetable","type":"`boolean` \\| `object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#array","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"dataType","type":"`object`","description":"The runtime dataType for the schema. It is not the same as\nthe \"$dataType\".","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"tax_region","type":"BelongsTo<[TaxRegion](/references/tax/models/TaxRegion)>","description":"The associated tax region.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the tax region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The country code of the tax region.","optional":false,"defaultValue":"","example":"us","expandable":false,"children":[]},{"name":"province_code","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The province code of the tax region","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"JSONProperty<NoInfer<Record<string, unknown>>>","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The ID of the user that created the tax region","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"BelongsTo<[TaxProvider](/references/tax/models/TaxProvider)>","description":"The provider that calculates taxes in this region.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"parent","type":"BelongsTo<[TaxRegion](/references/tax/models/TaxRegion)>","description":"The tax region's parent.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"children","type":"HasMany<[TaxRegion](/references/tax/models/TaxRegion)>","description":"The tax region's children..","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"tax_rates","type":"HasMany<[TaxRate](/references/tax/models/TaxRate)>","description":"The associated tax rates.","optional":false,"defaultValue":"","expandable":true,"children":[]}]},{"name":"rules","type":"HasMany<[TaxRateRule](/references/tax/models/TaxRateRule)>","description":"The associated rules.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the tax rate rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"JSONProperty<NoInfer<Record<string, unknown>>>","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The ID of the user that created the tax rate rule","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rate","type":"BelongsTo<[TaxRate](/references/tax/models/TaxRate)>","description":"The associated tax rate.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"reference","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The name of the table this rule references.","optional":false,"defaultValue":"","example":"product_type","expandable":false,"children":[]},{"name":"reference_id","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The id of a record in the table that this rule references.","optional":false,"defaultValue":"","example":"ptyp_1","expandable":false,"children":[]}]},{"name":"metadata","type":"JSONProperty<NoInfer<Record<string, unknown>>>","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"[TextProperty](/references/utils/classes/utils.TextProperty)","description":"The ID of the user that created the tax rate","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$dataType","type":"`string`","description":"A type-only property to infer the JavaScript data-type\nof the schema property","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"#retrievable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#providerOptions","type":"`Record<string, Record<string, unknown>>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#filterable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#sortable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#facetable","type":"`boolean` \\| `object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#array","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"#searchable","type":"`boolean` \\| `object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"dataType","type":"`object`","description":"The runtime dataType for the schema. It is not the same as\nthe \"$dataType\".","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]}]} |