TaxRateService
TaxRateService
Contains methods relating to TaxRate entities.
Signature
class TaxRateService {
constructor(connection: TransactionalConnection, eventBus: EventBus, listQueryBuilder: ListQueryBuilder, configService: ConfigService)
findAll(ctx: RequestContext, options?: ListQueryOptions<TaxRate>, relations?: RelationPaths<TaxRate>) => Promise<PaginatedList<TaxRate>>;
findOne(ctx: RequestContext, taxRateId: ID, relations?: RelationPaths<TaxRate>) => Promise<TaxRate | undefined>;
async create(ctx: RequestContext, input: CreateTaxRateInput) => Promise<TaxRate>;
async update(ctx: RequestContext, input: UpdateTaxRateInput) => Promise<TaxRate>;
async delete(ctx: RequestContext, id: ID) => Promise<DeletionResponse>;
async getApplicableTaxRate(ctx: RequestContext, zone: Zone, taxCategory: TaxCategory) => Promise<TaxRate>;
}
Members
constructor
method
type:
(connection: TransactionalConnection, eventBus: EventBus, listQueryBuilder: ListQueryBuilder, configService: ConfigService) => TaxRateService
findAll
method
type:
(ctx: RequestContext, options?: ListQueryOptions<TaxRate>, relations?: RelationPaths<TaxRate>) => Promise<PaginatedList<TaxRate>>
findOne
method
type:
(ctx: RequestContext, taxRateId: ID, relations?: RelationPaths<TaxRate>) => Promise<TaxRate | undefined>
create
method
type:
(ctx: RequestContext, input: CreateTaxRateInput) => Promise<TaxRate>
update
method
type:
(ctx: RequestContext, input: UpdateTaxRateInput) => Promise<TaxRate>
delete
method
type:
(ctx: RequestContext, id: ID) => Promise<DeletionResponse>
getApplicableTaxRate
method
type:
(ctx: RequestContext, zone: Zone, taxCategory: TaxCategory) => Promise<TaxRate>
Returns the applicable TaxRate based on the specified Zone and TaxCategory. Used when calculating Order
prices.