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\Orders;
|
||||
use Anikeen\Id\Result;
|
||||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Throwable;
|
||||
|
||||
trait ManagesOrders
|
||||
{
|
||||
@@ -15,12 +15,15 @@ trait ManagesOrders
|
||||
/**
|
||||
* Get orders from the current user.
|
||||
*
|
||||
* @throws RequestRequiresClientIdException
|
||||
* @throws GuzzleException
|
||||
* @throws Throwable
|
||||
*/
|
||||
public function orders(array $parameters = []): Orders
|
||||
{
|
||||
return (new Orders($this->request('GET', 'v1/orders', [], $parameters)))
|
||||
->setBillable($this);
|
||||
if (!isset($this->ordersCache)) {
|
||||
$this->ordersCache = Orders::builder(fn() => $this->request('GET', 'v1/orders', [], $parameters))
|
||||
->setBillable($this);
|
||||
}
|
||||
|
||||
return $this->ordersCache;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user