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:
25
src/Id/Concerns/ManagesCountries.php
Normal file
25
src/Id/Concerns/ManagesCountries.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace Anikeen\Id\Concerns;
|
||||
|
||||
use Anikeen\Id\ApiOperations\Request;
|
||||
use Anikeen\Id\Exceptions\RequestRequiresClientIdException;
|
||||
use Anikeen\Id\Resources\Countries;
|
||||
use GuzzleHttp\Exception\GuzzleException;
|
||||
|
||||
trait ManagesCountries
|
||||
{
|
||||
use Request;
|
||||
|
||||
/**
|
||||
* Get available countries for the current user.
|
||||
*
|
||||
* @throws RequestRequiresClientIdException
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function countries(): Countries
|
||||
{
|
||||
return (new Countries($this->request('GET', 'v1/countries')))
|
||||
->setBillable($this);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user