clearCustomerCart method
Clear customer cart
Implementation
Future<bool> clearCustomerCart() async {
try {
final response = await _client.authenticatedRequest<Map<String, dynamic>>(
'/rest/V1/carts/mine',
options: Options(method: 'DELETE'),
);
return response.statusCode == 200;
} on DioException catch (e) {
throw Exception('Failed to clear customer cart: ${e.message}');
} catch (e) {
throw Exception('Failed to clear customer cart: $e');
}
}