feat(tax): add support for updating tax rates (#6537)

This commit is contained in:
Sebastian Rindom
2024-02-29 11:03:18 +00:00
committed by GitHub
parent 2407b443f1
commit 6279fb3c67
11 changed files with 262 additions and 1 deletions
+10
View File
@@ -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
+7
View File
@@ -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>