mirror of
https://github.com/anikeen-com/id.git
synced 2026-11-01 21:29:32 +00:00
update resources
Signed-off-by: Maurice Preuß (envoyr) <hello@envoyr.com>
This commit is contained in:
33 files changed
+303
-320
No files matched your search
@@ -5,7 +5,7 @@ namespace Anikeen\Id\Concerns;
|
||||
use Anikeen\Id\ApiOperations\Request;
|
||||
use Anikeen\Id\Exceptions\RequestRequiresClientIdException;
|
||||
use Anikeen\Id\Resources\Invoices;
|
||||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Throwable;
|
||||
|
||||
trait ManagesInvoices
|
||||
{
|
||||
@@ -14,12 +14,15 @@ trait ManagesInvoices
|
||||
/**
|
||||
* Get invoices from the current user.
|
||||
*
|
||||
* @throws RequestRequiresClientIdException
|
||||
* @throws GuzzleException
|
||||
* @throws Throwable
|
||||
*/
|
||||
public function invoices(array $parameters = []): Invoices
|
||||
{
|
||||
return (new Invoices($this->request('GET', 'v1/invoices', [], $parameters)))
|
||||
->setBillable($this);
|
||||
if (!isset($this->invoicesCache)) {
|
||||
$this->invoicesCache = Invoices::builder(fn() => $this->request('GET', 'v1/invoices', [], $parameters))
|
||||
->setBillable($this);
|
||||
}
|
||||
|
||||
return $this->invoicesCache;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user