HopekellDev /
laravel-danarewa
| 1 | <?php |
||
| 2 | |||
| 3 | namespace HopekellDev\DanArewa; |
||
| 4 | |||
| 5 | use HopekellDev\DanArewa\Helpers\IpeClearance; |
||
| 6 | use HopekellDev\DanArewa\Helpers\UserDetails; |
||
| 7 | use HopekellDev\DanArewa\Helpers\Validation; |
||
| 8 | use HopekellDev\DanArewa\Helpers\Verifications; |
||
| 9 | |||
| 10 | class DanArewa |
||
| 11 | { |
||
| 12 | protected string $baseUrl; |
||
| 13 | protected string $apiKey; |
||
| 14 | |||
| 15 | public function __construct() |
||
| 16 | { |
||
| 17 | $this->baseUrl = rtrim(config('danarewa.base_url'), '/'); |
||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
| 18 | $this->apiKey = config('danarewa.api_key'); |
||
| 19 | } |
||
| 20 | |||
| 21 | public function verifications(): Verifications |
||
| 22 | { |
||
| 23 | return new Verifications($this->apiKey, $this->baseUrl); |
||
| 24 | } |
||
| 25 | |||
| 26 | public function ipeClearance(): IpeClearance |
||
| 27 | { |
||
| 28 | return new IpeClearance($this->apiKey, $this->baseUrl); |
||
| 29 | } |
||
| 30 | |||
| 31 | public function validation(): Validation |
||
| 32 | { |
||
| 33 | return new Validation($this->apiKey, $this->baseUrl); |
||
| 34 | } |
||
| 35 | |||
| 36 | public function userDetails(): UserDetails |
||
| 37 | { |
||
| 38 | return new UserDetails($this->apiKey, $this->baseUrl); |
||
| 39 | } |
||
| 40 | } |
||
| 41 |