Skip to main content

Function: taxService()

taxService(client): object

Defined in: service/TaxService.ts:26

Service for managing tax and zone tax code operations

Parameters​

client​

GraphQLClient

Returns​

createTax()​

createTax(input): Promise<Tax>

Creates a new tax *

Parameters​

input​

TaxCreateInput

Tax creation input *

Returns​

Promise<Tax>

Promise<Tax> The created tax

createZoneTaxCode()​

createZoneTaxCode(input): Promise&lt;ZoneTaxCode>

Creates a new zone tax code *

Parameters​

input​

ZoneTaxCodeCreateInput

Zone tax code creation input *

Returns​

Promise&lt;ZoneTaxCode>

Promise<ZoneTaxCode> The created zone tax code

createZoneTaxCodes()​

createZoneTaxCodes(input): Promise&lt;ZoneTaxCode[]>

Creates multiple zone tax codes *

Parameters​

input​

ZoneTaxCodeCreateInput[]

Array of zone tax code creation inputs *

Returns​

Promise&lt;ZoneTaxCode[]>

Promise<ZoneTaxCode[]> Array of created zone tax codes

getTax()​

getTax(id): Promise&lt;Tax>

Retrieves a specific tax *

Parameters​

id​

string

Tax ID (UUID string) *

Returns​

Promise&lt;Tax>

Promise<Tax> Tax data

getTaxes()​

getTaxes(input?): Promise&lt;TaxesResponse>

Retrieves taxes with search criteria *

Parameters​

input?​

TaxSearchInput

Search input parameters *

Returns​

Promise&lt;TaxesResponse>

Promise<TaxesResponse> Taxes response

getZoneTaxCode()​

getZoneTaxCode(id): Promise&lt;ZoneTaxCode>

Retrieves a specific zone tax code *

Parameters​

id​

number

Zone tax code ID *

Returns​

Promise&lt;ZoneTaxCode>

Promise<ZoneTaxCode> Zone tax code data

getZoneTaxCodes()​

getZoneTaxCodes(input?): Promise&lt;ZoneTaxCodeResponse>

Retrieves zone tax codes with search criteria *

Parameters​

input?​

ZoneTaxCodeSearchInput

Search input parameters *

Returns​

Promise&lt;ZoneTaxCodeResponse>

Promise<ZoneTaxCodeResponse> Zone tax codes response

updateTax()​

updateTax(variables): Promise&lt;Tax>

Updates an existing tax *

Parameters​

variables​

TaxUpdateVariables

Tax update input *

Returns​

Promise&lt;Tax>

Promise<Tax> The updated tax

updateZoneTaxCode()​

updateZoneTaxCode(variables): Promise&lt;ZoneTaxCode>

Updates an existing zone tax code *

Parameters​

variables​

ZoneTaxCodeUpdateVariables

Zone tax code update input *

Returns​

Promise&lt;ZoneTaxCode>

Promise<ZoneTaxCode> The updated zone tax code