mirror of
https://github.com/anikeen-com/id.git
synced 2026-03-13 21:56:14 +00:00
26 lines
609 B
PHP
26 lines
609 B
PHP
<?php
|
|
|
|
namespace Anikeen\Id\Resources;
|
|
|
|
use Anikeen\Id\Concerns\HasBillable;
|
|
use Anikeen\Id\Exceptions\RequestRequiresClientIdException;
|
|
use Anikeen\Id\Result;
|
|
use GuzzleHttp\Exception\GuzzleException;
|
|
|
|
class Invoices extends BaseCollection
|
|
{
|
|
use HasBillable;
|
|
|
|
/**
|
|
* {@inheritDoc}
|
|
*/
|
|
public function find(string $id): ?Invoice
|
|
{
|
|
$result = $this->billable->request('GET', sprintf('v1/invoices/%s', $id));
|
|
|
|
return $result->success()
|
|
? (new Invoice($result))
|
|
->setBillable($this->billable)
|
|
: null;
|
|
}
|
|
} |