import 'package:krow_core/core.dart';
import '../repositories/bank_account_repository.dart';
import '../arguments/add_bank_account_params.dart';

/// Use case to add a bank account.
class AddBankAccountUseCase implements UseCase<AddBankAccountParams, void> {
  final BankAccountRepository _repository;

  AddBankAccountUseCase(this._repository);

  @override
  Future<void> call(AddBankAccountParams params) {
    return _repository.addAccount(params.account);
  }
}
