I'm building an extension which imports orders created on a third-party system into Magento. The third-party system should be the single source of truth for the order's prices, tax rate, tax paid, etc.
When creating a quote item for each order line to be imported, I can successfully override the product's price with
setCustomPrice. Essentially, I'm looking for a way to do the equivalent for the tax rate (or even just the tax paid).
I've attempted using
setBaseTaxAmount, etc. to no avail. I've seen suggestion of hooking into
sales_quote_collect_totals_before, but I don't want to effect any orders created on the front-end of the Magento store (i.e. orders not from the third-party system).
Can someone please point me in the right direction!