mirror of
https://github.com/anikeen-com/id.git
synced 2026-11-02 05:39:35 +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,14 +2,12 @@
|
||||
|
||||
namespace Anikeen\Id\Concerns;
|
||||
|
||||
use Anikeen\Id\ApiOperations\Request;
|
||||
use Anikeen\Id\Exceptions\RequestRequiresClientIdException;
|
||||
use Anikeen\Id\Resources\Invoices;
|
||||
use Throwable;
|
||||
|
||||
trait ManagesInvoices
|
||||
{
|
||||
use Request;
|
||||
use HasBillable;
|
||||
|
||||
/**
|
||||
* Get invoices from the current user.
|
||||
@@ -19,7 +17,8 @@ trait ManagesInvoices
|
||||
public function invoices(array $parameters = []): Invoices
|
||||
{
|
||||
if (!isset($this->invoicesCache)) {
|
||||
$this->invoicesCache = Invoices::builder(fn() => $this->request('GET', 'v1/invoices', [], $parameters))
|
||||
$this->invoicesCache = Invoices::builder(fn() => $this->anikeenId()
|
||||
->request('GET', 'v1/invoices', [], $parameters))
|
||||
->setBillable($this);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user