add payment
This commit is contained in:
@@ -25,4 +25,10 @@ class FcsShipmentDataProvider {
|
||||
return await requestAPI("/fcs_shipments/ship", "PUT",
|
||||
payload: fcsShipment.toMap(), token: await getToken());
|
||||
}
|
||||
|
||||
Future<String> reportFcsShipment(FcsShipment fcsShipment) async {
|
||||
dynamic data = await requestAPI("/fcs_shipments/report", "POST",
|
||||
payload: fcsShipment.toMap(), token: await getToken());
|
||||
return data["url"];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'package:fcs/domain/entities/invoice.dart';
|
||||
import 'package:fcs/domain/entities/payment.dart';
|
||||
import 'package:fcs/helpers/api_helper.dart';
|
||||
import 'package:fcs/helpers/firebase_helper.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
@@ -22,4 +23,14 @@ class InvoiceDataProvider {
|
||||
return await requestAPI("/invoices/cancel", "PUT",
|
||||
payload: {"id": invoice.id}, token: await getToken());
|
||||
}
|
||||
|
||||
Future<void> pay(Payment payment) async {
|
||||
return await requestAPI("/invoices/pay", "PUT",
|
||||
payload: payment.toMap(), token: await getToken());
|
||||
}
|
||||
|
||||
Future<void> updatPaymentStatus(Payment payment) async {
|
||||
return await requestAPI("/invoices/pay/status", "PUT",
|
||||
payload: payment.toMap(), token: await getToken());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user