mirror of
https://github.com/anikeen-com/id.git
synced 2026-03-14 14:16:31 +00:00
refactored code
Signed-off-by: Maurice Preuß (envoyr) <hello@envoyr.com>
This commit is contained in:
26
src/Id/Resources/Invoice.php
Normal file
26
src/Id/Resources/Invoice.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace Anikeen\Id\Resources;
|
||||
|
||||
use Anikeen\Id\Concerns\HasBillable;
|
||||
use Anikeen\Id\Exceptions\RequestRequiresClientIdException;
|
||||
use GuzzleHttp\Exception\GuzzleException;
|
||||
|
||||
/**
|
||||
* @property string $id
|
||||
*/
|
||||
class Invoice extends BaseResource
|
||||
{
|
||||
use HasBillable;
|
||||
|
||||
/**
|
||||
* Get temporary download url from given invoice.
|
||||
*
|
||||
* @throws RequestRequiresClientIdException
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function getInvoiceTemporaryUrl(): string
|
||||
{
|
||||
return $this->billable->request('PUT', sprintf('v1/invoices/%s', $this->id))->data->temporary_url;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user