updateCard method
Future<Map>
updateCard(
- String token,
- String cardId,
- Map<
String, dynamic> authorizationControls, - String cardStatus,
- String nickname,
- Map<
String, String> primaryContactDetails, - String purpose,
override
Implementation
@override
Future<Map> updateCard(
String token,
String cardId,
Map<String, dynamic> authorizationControls,
String cardStatus,
String nickname,
Map<String, String> primaryContactDetails,
String purpose) async {
final String baseUrl = await getBaseUrl;
var bodyData = {
"authorization_controls": authorizationControls,
"card_status": cardStatus,
"nick_name": nickname,
"primary_contact_details": primaryContactDetails,
"purpose": purpose
};
var jsonBody = jsonEncode(bodyData);
var url = Uri.parse("$baseUrl/api/v1/issuing/cards/$cardId/limits");
var response = await http.post(
url,
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer $token"
},
body: jsonBody,
);
var data = jsonDecode(response.body);
//print(data);
return data;
}