deleteCustomerCard method
Implementation
Future<GetCustomerCardsResponse> deleteCustomerCard({required String customerToken, String skyflowId = ''}) async {
try {
_client = MyHttpClient(baseUrlTonder);
Response? response = await _client?.get(
Uri.parse('api/v1/cards/$skyflowId'),
headers: {
'Content-Type': 'application/json',
'Authorization': 'Token $customerToken'
}
);
if (response!.statusCode >= 200 ||response.statusCode < 300) {
final jsonResponse = json.decode(response.body) as Map<String, dynamic>;
return GetCustomerCardsResponse.fromJson(jsonResponse);
} else {
throw Exception(response.statusCode);
}
} catch (e) {
throw Exception(e);
}
}