cancelReturn method
Cancel return
Implementation
Future<bool> cancelReturn(String returnId) async {
try {
final response = await _client.authenticatedRequest<Map<String, dynamic>>(
'/rest/V1/returns/$returnId/cancel',
options: Options(method: 'POST'),
);
return response.statusCode == 200;
} on DioException catch (e) {
throw Exception('Failed to cancel return: ${e.message}');
} catch (e) {
throw Exception('Failed to cancel return: $e');
}
}