mirror of
https://github.com/anikeen-com/id.git
synced 2026-11-02 21:59:33 +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\Countries;
|
||||
use Throwable;
|
||||
|
||||
trait ManagesCountries
|
||||
{
|
||||
use Request;
|
||||
use HasBillable;
|
||||
|
||||
/**
|
||||
* Get available countries for the current user.
|
||||
@@ -19,7 +17,8 @@ trait ManagesCountries
|
||||
public function countries(): Countries
|
||||
{
|
||||
if (!isset($this->countriesCache)) {
|
||||
$this->countriesCache = Countries::builder(fn() => $this->request('GET', 'v1/countries'))
|
||||
$this->countriesCache = Countries::builder(fn() => $this->anikeenId()
|
||||
->request('GET', 'v1/countries'))
|
||||
->setBillable($this);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user