update address, cancel order
This commit is contained in:
@@ -140,4 +140,30 @@ class OrderRepositoryImpl implements OrderRepository {
|
||||
throw Exception('Failed to upload bill: $e');
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> updateOrderAddress({
|
||||
required String orderId,
|
||||
required String shippingAddressName,
|
||||
required String customerAddress,
|
||||
}) async {
|
||||
try {
|
||||
await _remoteDataSource.updateOrderAddress(
|
||||
orderId: orderId,
|
||||
shippingAddressName: shippingAddressName,
|
||||
customerAddress: customerAddress,
|
||||
);
|
||||
} catch (e) {
|
||||
throw Exception('Failed to update order address: $e');
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> cancelOrder(String orderId) async {
|
||||
try {
|
||||
await _remoteDataSource.cancelOrder(orderId);
|
||||
} catch (e) {
|
||||
throw Exception('Failed to cancel order: $e');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user