question

wsadiq avatar image
wsadiq asked sam Deactivated commented

clear customer form order

Hello,

I am trying to clear a customer that was attached to an order. I am calling the following code but it does not seem to be working.

Order currentOrder = orderConnector.getOrder(ordeId);
currentOrder.clearCustomers();
orderConnector.updateOrder(currentOrder);

Can you please help.

OrdersCustomers
10 |2000

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

1 Answer

wsadiq avatar image
wsadiq answered sam Deactivated commented

This seems to be working for me.

List<com.clover.sdk.v3.customers.Customer> customers = new ArrayList<>();
currentOrder.setCustomers(customers);
orderConnector.updateOrder(currentOrder);

Is this workaround OK?

10 |2000

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

Welcome to the
Clover Developer Community