Files
firefly-iii/app/Crud/Account/AccountCrudInterface.php

98 lines
2.0 KiB
PHP
Raw Normal View History

2016-05-20 09:25:17 +02:00
<?php
/**
* AccountCrudInterface.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
2016-05-20 09:25:17 +02:00
*/
declare(strict_types = 1);
2016-05-20 09:25:17 +02:00
namespace FireflyIII\Crud\Account;
use FireflyIII\Models\Account;
use FireflyIII\Models\AccountMeta;
2016-05-20 11:02:07 +02:00
use Illuminate\Support\Collection;
2016-05-20 09:25:17 +02:00
/**
* Interface AccountCrudInterface
*
* @package FireflyIII\Crud\Account
*/
interface AccountCrudInterface
{
2016-07-15 22:37:47 +02:00
/**
* @param string $number
2016-07-16 07:58:25 +02:00
* @param array $types
2016-07-15 22:37:47 +02:00
*
* @return Account
*/
public function findByAccountNumber(string $number, array $types): Account;
2016-07-16 07:58:25 +02:00
/**
* @param string $iban
2016-07-16 07:58:25 +02:00
* @param array $types
*
* @return Account
*/
public function findByIban(string $iban, array $types): Account;
2016-07-15 22:37:47 +02:00
2016-07-23 21:37:06 +02:00
/**
* @param string $name
2016-07-23 21:37:06 +02:00
* @param array $types
*
* @return Account
*/
public function findByName(string $name, array $types): Account;
2016-07-23 21:37:06 +02:00
2016-05-20 11:02:07 +02:00
/**
* @param array $accountIds
*
* @return Collection
*/
public function getAccountsById(array $accountIds): Collection;
/**
* @param array $types
*
* @return Collection
*/
public function getAccountsByType(array $types): Collection;
2016-10-01 08:49:02 +02:00
/**
* @param array $types
*
* @return Collection
*/
public function getActiveAccountsByType(array $types): Collection;
2016-05-20 09:25:17 +02:00
/**
* @param array $data
*
* @return Account
*/
public function store(array $data) : Account;
/**
* @param $account
* @param $name
* @param $value
*
* @return AccountMeta
*/
public function storeMeta(Account $account, string $name, $value): AccountMeta;
/**
* @param Account $account
* @param array $data
*
* @return Account
*/
public function update(Account $account, array $data): Account;
2016-08-12 15:10:03 +02:00
}