TaxRateService
internal.internal.TaxRateService
Properties
__configModule__
Record<string, unknown>__container__
anyRequired__moduleDeclaration__
Record<string, unknown>manager_
EntityManagerRequiredtaxRateRepository_
Repository<TaxRate> & { 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 }RequiredtransactionManager_
undefined | EntityManagerRequiredAccessors
activeManager_
Protected
get
activeManager_(): EntityManager
Returns
EntityManager
EntityManager
EntityManagerRequiredInherited from
TransactionBaseService.activeManager_
Methods
addToProduct
addToProduct(id
, productIds
, replace?
): Promise
<ProductTaxRate
| ProductTaxRate
[]>
Parameters
id
stringRequiredproductIds
string | string[]Requiredreplace
booleanReturns
Promise
<ProductTaxRate
| ProductTaxRate
[]>
addToProductType
addToProductType(id
, productTypeIds
, replace?
): Promise
<ProductTypeTaxRate
[]>
Parameters
id
stringRequiredproductTypeIds
string | string[]Requiredreplace
booleanReturns
Promise
<ProductTypeTaxRate
[]>
addToShippingOption
addToShippingOption(id
, optionIds
, replace?
): Promise
<ShippingTaxRate
[]>
Parameters
id
stringRequiredoptionIds
string | string[]Requiredreplace
booleanReturns
Promise
<ShippingTaxRate
[]>
atomicPhase_
Protected
atomicPhase_<TResult
, TError
>(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.
TResult
objectRequiredTError
objectRequiredParameters
work
(transactionManager: EntityManager) => Promise<TResult>RequiredisolationOrErrorHandler
IsolationLevel | (error: TError) => Promise<void | TResult>maybeErrorHandlerOrDontFail
(error: TError) => Promise<void | TResult>Returns
Promise
<TResult
>
Promise
Promise<TResult>RequiredInherited from
TransactionBaseService.atomicPhase_
create
create(data
): Promise
<TaxRate
>
Parameters
Returns
Promise
<TaxRate
>
delete
delete(id
): Promise
<void
>
Parameters
id
string | string[]RequiredReturns
Promise
<void
>
Promise
Promise<void>Requiredlist
list(selector
, config?
): Promise
<TaxRate
[]>
Parameters
config
FindConfig<TaxRate>Returns
Promise
<TaxRate
[]>
listAndCount
listAndCount(selector
, config?
): Promise
<[TaxRate
[], number
]>
Parameters
config
FindConfig<TaxRate>Returns
Promise
<[TaxRate
[], number
]>
listByProduct
listByProduct(productId
, config
): Promise
<TaxRate
[]>
Parameters
productId
stringRequiredReturns
Promise
<TaxRate
[]>
listByShippingOption
listByShippingOption(shippingOptionId
): Promise
<TaxRate
[]>
Parameters
shippingOptionId
stringRequiredReturns
Promise
<TaxRate
[]>
removeFromProduct
removeFromProduct(id
, productIds
): Promise
<void
>
Parameters
id
stringRequiredproductIds
string | string[]RequiredReturns
Promise
<void
>
Promise
Promise<void>RequiredremoveFromProductType
removeFromProductType(id
, typeIds
): Promise
<void
>
Parameters
id
stringRequiredtypeIds
string | string[]RequiredReturns
Promise
<void
>
Promise
Promise<void>RequiredremoveFromShippingOption
removeFromShippingOption(id
, optionIds
): Promise
<void
>
Parameters
id
stringRequiredoptionIds
string | string[]RequiredReturns
Promise
<void
>
Promise
Promise<void>Requiredretrieve
retrieve(taxRateId
, config?
): Promise
<TaxRate
>
Parameters
taxRateId
stringRequiredconfig
FindConfig<TaxRate>Returns
Promise
<TaxRate
>
shouldRetryTransaction_
Protected
shouldRetryTransaction_(err
): boolean
Parameters
err
Record<string, unknown> | { code: string }RequiredReturns
boolean
boolean
booleanInherited from
TransactionBaseService.shouldRetryTransaction_
update
update(id
, data
): Promise
<TaxRate
>
Parameters
id
stringRequiredReturns
Promise
<TaxRate
>
withTransaction
withTransaction(transactionManager?
): TaxRateService
Parameters
transactionManager
EntityManager