deleteOrder method
Deletes an existing order and returns the WooOrder object.
Related endpoint: https://woocommerce.github.io/woocommerce-rest-api-docs/#orders.
Implementation
Future<WooOrder> deleteOrder({required int orderId}) async {
Map data = {
'force': true,
};
_printToLog('Deleting Order With Id : ' + orderId.toString());
_setApiResourceUrl(
path: 'orders/' + orderId.toString(),
);
final response = await delete(queryUri.toString(), data);
return WooOrder.fromJson(response);
}