question

tg avatar image
tg asked Sukhbir Singh commented

How do you set a tax rate via the SDK?

Attempting to follow the patterns of the SDK but keep getting:

status code: 400 cannot update one or more of these fields: LineItem{json='{"taxRates":{"elements":[{"name":"Our Tax Rate","rate":1000}]}}', bundle=null, changeLog=null}

List<LineItem> lineItemList = orderConnector.getOrder(orderId).getLineItems(); TaxRate taxRate = new TaxRate(); taxRate.setRate(1000l); taxRate.setName("Our Tax Rate"); List<TaxRate> taxRates = new ArrayList<>(); taxRates.add(taxRate); LineItem lineItem = lineItemList.get(0); lineItem.setTaxRates(taxRates); orderConnector.updateLineItems(orderId, lineItemList);

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

Welcome to the
Clover Developer Community