//native
type SageIntacct = {
token: string
}
/**
* Delete an Order Entry tax detail
* Deletes an Order Entry tax detail. Deleted tax details are removed from the system and can't be recovered.
*/
export async function main(auth: SageIntacct, key: string) {
const url = new URL(`https://api.intacct.com/ia/api/v1/objects/tax/order-entry-tax-detail/${key}`)
const response = await fetch(url, {
method: 'DELETE',
headers: {
Authorization: 'Bearer ' + auth.token
},
body: undefined
})
if (!response.ok) {
const text = await response.text()
throw new Error(`${response.status} ${text}`)
}
return await response.text()
}
Submitted by hugo697 235 days ago