mirror of
https://github.com/anikeen-com/id.git
synced 2026-11-04 22:59:41 +00:00
refactor code
This commit is contained in:
1 parent
c641ec725d
commit
25248e7822
37 files changed
+180
-143
No files matched your search
@@ -2,15 +2,12 @@
|
||||
|
||||
namespace Anikeen\Id\Concerns;
|
||||
|
||||
use Anikeen\Id\ApiOperations\Request;
|
||||
use Anikeen\Id\Exceptions\RequestRequiresClientIdException;
|
||||
use Anikeen\Id\Resources\Transactions;
|
||||
use Anikeen\Id\Result;
|
||||
use Throwable;
|
||||
|
||||
trait ManagesTransactions
|
||||
{
|
||||
use Request;
|
||||
use HasBillable;
|
||||
|
||||
/**
|
||||
* Get transactions from the current user.
|
||||
@@ -20,7 +17,8 @@ trait ManagesTransactions
|
||||
public function transactions(): Transactions
|
||||
{
|
||||
if (!isset($this->transactionsCache)) {
|
||||
$this->transactionsCache = Transactions::builder(fn() => $this->request('GET', 'v1/transactions'))
|
||||
$this->transactionsCache = Transactions::builder(fn() => $this->anikeenId()
|
||||
->request('GET', 'v1/transactions'))
|
||||
->setBillable($this);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user