import '../domain/order.dart';
import '../domain/order_action_result.dart';
import '../domain/orders_repository.dart';

/// Use case: create a new order and persist it.
class CreateOrder {
  final OrdersRepository repository;

  CreateOrder(this.repository);

  Future<OrderActionResult> call(Order order) => repository.createOrder(order);
}
