updateCardHolder method
Future<Map>
updateCardHolder(
- String token,
- String cardholderId,
- Map<
String, String> address, - Map<
String, dynamic> individual, - String mobileNumber,
- Map<
String, String> postalAddress,
override
Implementation
@override
Future<Map> updateCardHolder(
String token,
String cardholderId,
Map<String, String> address,
Map<String, dynamic> individual,
String mobileNumber,
Map<String, String> postalAddress) async {
final baseUrl = await getBaseUrl;
var bodyData = {
"address": address,
"individual": individual,
"mobile_number": mobileNumber,
"postal_address": postalAddress
};
var jsonBody = jsonEncode(bodyData);
var url =
Uri.parse("$baseUrl/api/v1/issuing/cardholders/$cardholderId/update");
var response = await http.post(
url,
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer $token"
},
body: jsonBody,
);
var data = jsonDecode(response.body);
return data;
}