updateCustomsDeclaration method
Implementation
@override
Future<Map> updateCustomsDeclaration(
String token,
String customsDeclarationId,
Map<String, dynamic> customsDeclarationInfo) async {
final baseUrl = await getBaseUrl;
var url = Uri.parse(
"$baseUrl/api/v1/pa/customs_declarations/$customsDeclarationId/update");
var jsonBody = jsonEncode(customsDeclarationInfo);
var response = await http.post(
url,
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer $token"
},
body: jsonBody,
);
var data = jsonDecode(response.body);
return data;
}