feat(tax): add support for updating tax rates (#6537)
This commit is contained in:
@@ -9,6 +9,16 @@ export interface CreateTaxRateDTO {
|
||||
metadata?: Record<string, unknown>
|
||||
}
|
||||
|
||||
export interface UpsertTaxRateDTO {
|
||||
id?: string
|
||||
rate?: number | null
|
||||
code?: string | null
|
||||
name?: string
|
||||
is_default?: boolean
|
||||
created_by?: string | null
|
||||
metadata?: Record<string, unknown> | null
|
||||
}
|
||||
|
||||
export interface UpdateTaxRateDTO {
|
||||
rate?: number | null
|
||||
code?: string | null
|
||||
|
||||
@@ -20,6 +20,7 @@ import {
|
||||
CreateTaxRateDTO,
|
||||
CreateTaxRegionDTO,
|
||||
UpdateTaxRateDTO,
|
||||
UpsertTaxRateDTO,
|
||||
} from "./mutations"
|
||||
|
||||
export interface ITaxModuleService extends IModuleService {
|
||||
@@ -63,6 +64,12 @@ export interface ITaxModuleService extends IModuleService {
|
||||
sharedContext?: Context
|
||||
): Promise<TaxRateDTO[]>
|
||||
|
||||
upsert(data: UpsertTaxRateDTO, sharedContext?: Context): Promise<TaxRateDTO>
|
||||
upsert(
|
||||
data: UpsertTaxRateDTO[],
|
||||
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