mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Introduce group collector to API
This commit is contained in:
@@ -24,6 +24,11 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Helpers\Collector;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Models\Bill;
|
||||
use FireflyIII\Models\Budget;
|
||||
use FireflyIII\Models\Category;
|
||||
use FireflyIII\Models\Tag;
|
||||
use FireflyIII\Models\TransactionCurrency;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Pagination\LengthAwarePaginator;
|
||||
use Illuminate\Support\Collection;
|
||||
@@ -56,6 +61,51 @@ interface GroupCollectorInterface
|
||||
*/
|
||||
public function setAccounts(Collection $accounts): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* Limit the search to a specific bill.
|
||||
*
|
||||
* @param Bill $bill
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function setBill(Bill $bill): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* Limit the search to a specific budget.
|
||||
*
|
||||
* @param Budget $budget
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function setBudget(Budget $budget): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* Limit the search to a specific set of budgets.
|
||||
*
|
||||
* @param Collection $budgets
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function setBudgets(Collection $budgets): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* Limit the search to a specific category.
|
||||
*
|
||||
* @param Category $category
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function setCategory(Category $category): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* Limit results to a specific currency, either foreign or normal one.
|
||||
*
|
||||
* @param TransactionCurrency $currency
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function setCurrency(TransactionCurrency $currency): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* Limit the number of returned entries.
|
||||
*
|
||||
@@ -74,6 +124,15 @@ interface GroupCollectorInterface
|
||||
*/
|
||||
public function setPage(int $page): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* Limit the result to a set of specific journals.
|
||||
*
|
||||
* @param array $journalIds
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function setJournalIds(array $journalIds): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* Set the start and end time of the results to return.
|
||||
*
|
||||
@@ -84,6 +143,15 @@ interface GroupCollectorInterface
|
||||
*/
|
||||
public function setRange(Carbon $start, Carbon $end): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* Limit results to a specific tag.
|
||||
*
|
||||
* @param Tag $tag
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function setTag(Tag $tag): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* Limit the included transaction types.
|
||||
*
|
||||
@@ -102,6 +170,13 @@ interface GroupCollectorInterface
|
||||
*/
|
||||
public function setUser(User $user): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* Automatically include all stuff required to make API calls work.
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function withAPIInformation(): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* Will include the source and destination account names and types.
|
||||
*
|
||||
|
Reference in New Issue
Block a user