Hello Folks,
We want to apply TaxRate to the whole Order. As far as we go through the documentation and other questions in the community, we found a way to add TaxRate to LineItem. We have tried to add TaxRate using the below approaches but somehow it's not applying taxes to the line-item or Order.
Approach 1
List<TaxRate> taxRates=new ArrayList<>(); TaxRate taxRate=new TaxRate(); taxRate.setId("E2VEK6XHFWS0A"); taxRate.setName("Test Tax"); taxRate.setRate(2l); taxRate.setIsDefault(true); taxRates.add(taxRate); item.setTaxRates(taxRates)
Approach 2
List<String> taxRateIds=new ArrayList<>(); taxRateIds.add("64HKN3ZTE5BB8"); inventoryConnector.assignTaxRatesToItem(item.getItem().getId(), taxRateIds);
None of the above is working and Tax is not applied to LineItem. Tax is showing "0.00" and whatever TaxRate Name we have entered in above code is also not displaying there.
Any suggestion will be very helpful in this.
Regards,
Developer