feat(tax): add support for updating tax rates (#6516)
**What** - Adds update
This commit is contained in:
@@ -9,6 +9,15 @@ export interface CreateTaxRateDTO {
|
||||
metadata?: Record<string, unknown>
|
||||
}
|
||||
|
||||
export interface UpdateTaxRateDTO {
|
||||
rate?: number | null
|
||||
code?: string | null
|
||||
name?: string
|
||||
is_default?: boolean
|
||||
created_by?: string
|
||||
metadata?: Record<string, unknown>
|
||||
}
|
||||
|
||||
export interface CreateTaxRegionDTO {
|
||||
country_code: string
|
||||
province_code?: string | null
|
||||
|
||||
@@ -19,6 +19,7 @@ import {
|
||||
CreateTaxRateRuleDTO,
|
||||
CreateTaxRateDTO,
|
||||
CreateTaxRegionDTO,
|
||||
UpdateTaxRateDTO,
|
||||
} from "./mutations"
|
||||
|
||||
export interface ITaxModuleService extends IModuleService {
|
||||
@@ -46,6 +47,22 @@ export interface ITaxModuleService extends IModuleService {
|
||||
): Promise<TaxRateDTO[]>
|
||||
create(data: CreateTaxRateDTO, sharedContext?: Context): Promise<TaxRateDTO>
|
||||
|
||||
update(
|
||||
taxRateId: string,
|
||||
data: UpdateTaxRateDTO,
|
||||
sharedContext?: Context
|
||||
): Promise<TaxRateDTO>
|
||||
update(
|
||||
taxRateIds: string[],
|
||||
data: UpdateTaxRateDTO,
|
||||
sharedContext?: Context
|
||||
): Promise<TaxRateDTO[]>
|
||||
update(
|
||||
selector: FilterableTaxRateProps,
|
||||
data: UpdateTaxRateDTO,
|
||||
sharedContext?: Context
|
||||
): Promise<TaxRateDTO[]>
|
||||
|
||||
delete(taxRateIds: string[], sharedContext?: Context): Promise<void>
|
||||
delete(taxRateId: string, sharedContext?: Context): Promise<void>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user