createConfirmationLetter method
Implementation
@override
Future<Map> createConfirmationLetter(
String token, String format, String transactionId) async {
final baseUrl = await getBaseUrl;
var url = Uri.parse("$baseUrl/api/v1/confirmation_letters/create");
var bodyData = {"format": format, "transaction_id": transactionId};
var jsonBody = jsonEncode(bodyData);
var response = await http.post(
url,
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer $token",
},
body: jsonBody,
);
var data = jsonDecode(response.body);
return data;
}