mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-07 06:31:22 +00:00
Expand API for recurring transactions.
This commit is contained in:
@@ -527,6 +527,22 @@ class TransactionCollector implements TransactionCollectorInterface
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $journalIds
|
||||
*
|
||||
* @return TransactionCollectorInterface
|
||||
*/
|
||||
public function setJournalIds(array $journalIds): TransactionCollectorInterface
|
||||
{
|
||||
$this->query->where(
|
||||
function (EloquentBuilder $q) use ($journalIds) {
|
||||
$q->whereIn('transaction_journals.id', $journalIds);
|
||||
}
|
||||
);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Collection $journals
|
||||
*
|
||||
|
||||
@@ -82,13 +82,6 @@ interface TransactionCollectorInterface
|
||||
*/
|
||||
public function count(): int;
|
||||
|
||||
/**
|
||||
* Get all transactions.
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function getTransactions(): Collection;
|
||||
|
||||
/**
|
||||
* Get a paginated result.
|
||||
*
|
||||
@@ -103,6 +96,13 @@ interface TransactionCollectorInterface
|
||||
*/
|
||||
public function getQuery(): EloquentBuilder;
|
||||
|
||||
/**
|
||||
* Get all transactions.
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function getTransactions(): Collection;
|
||||
|
||||
/**
|
||||
* Set to ignore the cache.
|
||||
*
|
||||
@@ -198,6 +198,15 @@ interface TransactionCollectorInterface
|
||||
*/
|
||||
public function setCategory(Category $category): TransactionCollectorInterface;
|
||||
|
||||
/**
|
||||
* Set the journal IDs to filter on.
|
||||
*
|
||||
* @param array $journalIds
|
||||
*
|
||||
* @return TransactionCollectorInterface
|
||||
*/
|
||||
public function setJournalIds(array $journalIds): TransactionCollectorInterface;
|
||||
|
||||
/**
|
||||
* Set the journals to filter on.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user