updatePaymentLink method
Implementation
@override
Future<Map> updatePaymentLink(String token, String paymentLinkId,
String title, String description, String reference) async {
final baseUrl = await getBaseUrl;
var url =
Uri.parse("$baseUrl/api/v1/pa/payment_links/$paymentLinkId/update");
var bodyData = {
"description": description,
"reference": reference,
"title": title
};
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;
}