Skip to main content

Class: TaxRateService

Hierarchy

  • "medusa-interfaces"

    TaxRateService

Constructors

constructor

new TaxRateService(__namedParameters)

Parameters

NameType
__namedParametersObject

Overrides

BaseService.constructor

Defined in

services/tax-rate.ts:27

Properties

manager_

Private manager_: EntityManager

Defined in

services/tax-rate.ts:21


productService_

Private productService_: ProductService

Defined in

services/tax-rate.ts:22


productTypeService_

Private productTypeService_: ProductTypeService

Defined in

services/tax-rate.ts:23


shippingOptionService_

Private shippingOptionService_: ShippingOptionService

Defined in

services/tax-rate.ts:24


taxRateRepository_

Private taxRateRepository_: typeof TaxRateRepository

Defined in

services/tax-rate.ts:25

Methods

addToProduct

addToProduct(id, productIds, replace?): Promise<ProductTaxRate | ProductTaxRate[]>

Parameters

NameTypeDefault value
idstringundefined
productIdsstring | string[]undefined
replacebooleanfalse

Returns

Promise<ProductTaxRate | ProductTaxRate[]>

Defined in

services/tax-rate.ts:197


addToProductType

addToProductType(id, productTypeIds, replace?): Promise<ProductTypeTaxRate[]>

Parameters

NameTypeDefault value
idstringundefined
productTypeIdsstring | string[]undefined
replacebooleanfalse

Returns

Promise<ProductTypeTaxRate[]>

Defined in

services/tax-rate.ts:233


addToShippingOption

addToShippingOption(id, optionIds, replace?): Promise<ShippingTaxRate>

Parameters

NameTypeDefault value
idstringundefined
optionIdsstring | string[]undefined
replacebooleanfalse

Returns

Promise<ShippingTaxRate>

Defined in

services/tax-rate.ts:273


create

create(data): Promise<TaxRate>

Parameters

NameType
dataCreateTaxRateInput

Returns

Promise<TaxRate>

Defined in

services/tax-rate.ts:104


delete

delete(id): Promise<void>

Parameters

NameType
idstring | string[]

Returns

Promise<void>

Defined in

services/tax-rate.ts:135


list

list(selector, config?): Promise<TaxRate[]>

Parameters

NameType
selectorFilterableTaxRateProps
configFindConfig<TaxRate>

Returns

Promise<TaxRate[]>

Defined in

services/tax-rate.ts:62


listAndCount

listAndCount(selector, config?): Promise<[TaxRate[], number]>

Parameters

NameType
selectorFilterableTaxRateProps
configFindConfig<TaxRate>

Returns

Promise<[TaxRate[], number]>

Defined in

services/tax-rate.ts:73


listByProduct

listByProduct(productId, config): Promise<TaxRate[]>

Parameters

NameType
productIdstring
configTaxRateListByConfig

Returns

Promise<TaxRate[]>

Defined in

services/tax-rate.ts:321


listByShippingOption

listByShippingOption(shippingOptionId, config): Promise<TaxRate[]>

Parameters

NameType
shippingOptionIdstring
configTaxRateListByConfig

Returns

Promise<TaxRate[]>

Defined in

services/tax-rate.ts:332


removeFromProduct

removeFromProduct(id, productIds): Promise<void>

Parameters

NameType
idstring
productIdsstring | string[]

Returns

Promise<void>

Defined in

services/tax-rate.ts:143


removeFromProductType

removeFromProductType(id, typeIds): Promise<void>

Parameters

NameType
idstring
typeIdsstring | string[]

Returns

Promise<void>

Defined in

services/tax-rate.ts:161


removeFromShippingOption

removeFromShippingOption(id, optionIds): Promise<void>

Parameters

NameType
idstring
optionIdsstring | string[]

Returns

Promise<void>

Defined in

services/tax-rate.ts:179


retrieve

retrieve(id, config?): Promise<TaxRate>

Parameters

NameType
idstring
configFindConfig<TaxRate>

Returns

Promise<TaxRate>

Defined in

services/tax-rate.ts:84


update

update(id, data): Promise<TaxRate>

Parameters

NameType
idstring
dataUpdateTaxRateInput

Returns

Promise<TaxRate>

Defined in

services/tax-rate.ts:120


withTransaction

withTransaction(transactionManager): TaxRateService

Parameters

NameType
transactionManagerEntityManager

Returns

TaxRateService

Defined in

services/tax-rate.ts:43