mirror of
https://github.com/anikeen-com/id.git
synced 2026-03-17 07:36:12 +00:00
update resources
Signed-off-by: Maurice Preuß (envoyr) <hello@envoyr.com>
This commit is contained in:
@@ -6,7 +6,7 @@ use Anikeen\Id\ApiOperations\Request;
|
||||
use Anikeen\Id\Exceptions\RequestRequiresClientIdException;
|
||||
use Anikeen\Id\Resources\Transactions;
|
||||
use Anikeen\Id\Result;
|
||||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Throwable;
|
||||
|
||||
trait ManagesTransactions
|
||||
{
|
||||
@@ -15,12 +15,15 @@ trait ManagesTransactions
|
||||
/**
|
||||
* Get transactions from the current user.
|
||||
*
|
||||
* @throws RequestRequiresClientIdException
|
||||
* @throws GuzzleException
|
||||
* @throws Throwable
|
||||
*/
|
||||
public function transactions(): Transactions
|
||||
{
|
||||
return (new Transactions($this->request('GET', 'v1/transactions')))
|
||||
->setBillable($this);;
|
||||
if (!isset($this->transactionsCache)) {
|
||||
$this->transactionsCache = Transactions::builder(fn() => $this->request('GET', 'v1/transactions'))
|
||||
->setBillable($this);
|
||||
}
|
||||
|
||||
return $this->transactionsCache;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user