Hi there,
We are trying to add a tax rate to a line item using the clover sdk but we think there is an issue with the clover sdk.
Here is a snippet of our code;
LineItem lineItem = new LineItem();
lineItem.setIsRevenue(true);
lineItem.setName("Name");
lineItem.setPrice(1000l);
ArrayList<TaxRate> taxRates = new ArrayList<>();
TaxRate taxRate = new TaxRate();
taxRate.setId("ASAQPFWX7S3BE");
taxRate.setName("VAT");
taxRate.setRate(2000000l);
taxRate.setIsDefault(true);
taxRates.add(taxRate);
lineItem.setTaxRates(taxRates);
orderConnector.addCustomLineItem(CloverData.sCloverOrderId, lineItem, false);
Every time we make this call we get the error.
com.clover.sdk.v1.ClientException: status code: 400 cannot update one or more of these fields: LineItem{json='{"taxRates":{"elements":[{"id":"ASAQPFWX7S3BE","name":"VAT","rate":2000000,"isDefault":true}]},"name":"Adult","price":2000,"isRevenue":true}', bundle=null, changeLog=null}
Any idea what were are doing wrong?