--- displayed_sidebar: servicesSidebar --- import ParameterTypes from "@site/src/components/ParameterTypes" # TaxRateService ## Constructors ### constructor `**new TaxRateService**(«destructured»)` #### Parameters ## Properties `", "description": "", "optional": true, "defaultValue": "", "expandable": false, "children": [] }, { "name": "__container__", "type": "`any`", "description": "", "optional": false, "defaultValue": "", "expandable": false, "children": [] }, { "name": "__moduleDeclaration__", "type": "`Record`", "description": "", "optional": true, "defaultValue": "", "expandable": false, "children": [] }, { "name": "manager_", "type": "EntityManager", "description": "", "optional": false, "defaultValue": "", "expandable": false, "children": [] }, { "name": "productService_", "type": "[ProductService](ProductService.mdx)", "description": "", "optional": false, "defaultValue": "", "expandable": false, "children": [] }, { "name": "productTypeService_", "type": "[ProductTypeService](ProductTypeService.mdx)", "description": "", "optional": false, "defaultValue": "", "expandable": false, "children": [] }, { "name": "shippingOptionService_", "type": "[ShippingOptionService](ShippingOptionService.mdx)", "description": "", "optional": false, "defaultValue": "", "expandable": false, "children": [] }, { "name": "taxRateRepository_", "type": "Repository<[TaxRate](TaxRate.mdx)> & `{ addToProduct: Method addToProduct ; addToProductType: Method addToProductType ; addToShippingOption: Method addToShippingOption ; applyResolutionsToQueryBuilder: Method applyResolutionsToQueryBuilder ; findAndCountWithResolution: Method findAndCountWithResolution ; findOneWithResolution: Method findOneWithResolution ; findWithResolution: Method findWithResolution ; getFindQueryBuilder: Method getFindQueryBuilder ; listByProduct: Method listByProduct ; listByShippingOption: Method listByShippingOption ; removeFromProduct: Method removeFromProduct ; removeFromProductType: Method removeFromProductType ; removeFromShippingOption: Method removeFromShippingOption }`", "description": "", "optional": false, "defaultValue": "", "expandable": false, "children": [] }, { "name": "transactionManager_", "type": "`undefined` \\| EntityManager", "description": "", "optional": false, "defaultValue": "", "expandable": false, "children": [] } ]} /> ## Accessors ### activeManager\_ `Protected get**activeManager_**(): EntityManager` #### Returns EntityManager ## Methods ### addToProduct `**addToProduct**(id, productIds, replace?): Promise<[ProductTaxRate](ProductTaxRate.mdx) \| [ProductTaxRate](ProductTaxRate.mdx)[]>` #### Parameters #### Returns Promise<[ProductTaxRate](ProductTaxRate.mdx) \| [ProductTaxRate](ProductTaxRate.mdx)[]> ___ ### addToProductType `**addToProductType**(id, productTypeIds, replace?): Promise<[ProductTypeTaxRate](ProductTypeTaxRate.mdx)[]>` #### Parameters #### Returns Promise<[ProductTypeTaxRate](ProductTypeTaxRate.mdx)[]> ___ ### addToShippingOption `**addToShippingOption**(id, optionIds, replace?): Promise<[ShippingTaxRate](ShippingTaxRate.mdx)[]>` #### Parameters #### Returns Promise<[ShippingTaxRate](ShippingTaxRate.mdx)[]> ___ ### atomicPhase\_ `Protected **atomicPhase_**(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>` Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created. #### Parameters Promise<TResult>", "description": "the transactional work to be done", "optional": false, "defaultValue": "", "expandable": false, "children": [] }, { "name": "isolationOrErrorHandler", "type": "`IsolationLevel` \\| (`error`: `TError`) => Promise<void \\| TResult>", "description": "the isolation level to be used for the work.", "optional": true, "defaultValue": "", "expandable": false, "children": [] }, { "name": "maybeErrorHandlerOrDontFail", "type": "(`error`: `TError`) => Promise<void \\| TResult>", "description": "Potential error handler", "optional": true, "defaultValue": "", "expandable": false, "children": [] } ]} /> #### Returns Promise<TResult> ___ ### create `**create**(data): Promise<[TaxRate](TaxRate.mdx)>` #### Parameters #### Returns Promise<[TaxRate](TaxRate.mdx)> ___ ### delete `**delete**(id): Promise<void>` #### Parameters #### Returns Promise<void> ___ ### list `**list**(selector, config?): Promise<[TaxRate](TaxRate.mdx)[]>` #### Parameters #### Returns Promise<[TaxRate](TaxRate.mdx)[]> ___ ### listAndCount `**listAndCount**(selector, config?): Promise<[[TaxRate](TaxRate.mdx)[], number]>` #### Parameters #### Returns Promise<[[TaxRate](TaxRate.mdx)[], number]> ___ ### listByProduct `**listByProduct**(productId, config): Promise<[TaxRate](TaxRate.mdx)[]>` #### Parameters #### Returns Promise<[TaxRate](TaxRate.mdx)[]> ___ ### listByShippingOption `**listByShippingOption**(shippingOptionId): Promise<[TaxRate](TaxRate.mdx)[]>` #### Parameters #### Returns Promise<[TaxRate](TaxRate.mdx)[]> ___ ### removeFromProduct `**removeFromProduct**(id, productIds): Promise<void>` #### Parameters #### Returns Promise<void> ___ ### removeFromProductType `**removeFromProductType**(id, typeIds): Promise<void>` #### Parameters #### Returns Promise<void> ___ ### removeFromShippingOption `**removeFromShippingOption**(id, optionIds): Promise<void>` #### Parameters #### Returns Promise<void> ___ ### retrieve `**retrieve**(taxRateId, config?): Promise<[TaxRate](TaxRate.mdx)>` #### Parameters #### Returns Promise<[TaxRate](TaxRate.mdx)> ___ ### shouldRetryTransaction\_ `Protected **shouldRetryTransaction_**(err): boolean` #### Parameters ` \\| `{ code: string }`", "description": "", "optional": false, "defaultValue": "", "expandable": false, "children": [] } ]} /> #### Returns `boolean` ___ ### update `**update**(id, data): Promise<[TaxRate](TaxRate.mdx)>` #### Parameters #### Returns Promise<[TaxRate](TaxRate.mdx)> ___ ### withTransaction `**withTransaction**(transactionManager?): [TaxRateService](TaxRateService.mdx)` #### Parameters #### Returns [TaxRateService](TaxRateService.mdx)