From 853ad4562fd17434afbb55b550ecee31b36f7242 Mon Sep 17 00:00:00 2001 From: Deon George Date: Wed, 3 Jul 2024 13:07:23 +1000 Subject: [PATCH] Updates from osb --- src/API.php | 33 +++++++++++++++++++++++++++++++-- src/Response/Base.php | 2 +- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/src/API.php b/src/API.php index 8f300bc..232987c 100644 --- a/src/API.php +++ b/src/API.php @@ -3,12 +3,11 @@ namespace Dreamscape; use Dreamscape\Response\Base; +use Dreamscape\Response\Generic; use Illuminate\Support\Arr; use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\Log; -use Dreamscape\Response\Generic; - final class API { private const LOGKEY = 'API'; @@ -19,6 +18,36 @@ final class API private string $key; private string $url; + private const CUSTOMER_STATUS = [ + 1 => 'Active', // Account active + 2 => 'Pending', // Account is waiting for email verification + 3 => 'Suspended', // Account suspended, can only login and add additional credit + 4 => 'Disabled', // Account disabled, no login or any other action allowed + 5 => 'Terminated', // Account deleted. + ]; + + // https://doc-reseller-api.ds.network + private const DOMAIN_STATUS = [ + 1 => 'Awaiting Registration', + 2 => 'Registered', + 3 => 'Awaiting Renewal', + 4 => 'Awaiting Deleted', + 5 => 'Deleted', + 6 => 'Expired', + 7 => 'Awaiting Transfer In', + 8 => 'Awaiting Transfer Out', + 9 => 'Error', + ]; + + private const PRODUCT_STATUS = [ + 1 => 'Awaiting Registration', + 2 => 'Registered', + 3 => 'Awaiting Renewal', + 4 => 'Awaiting Deleted', + 5 => 'Deleted', + 6 => 'Expired', + ]; + public function __construct(string $id,string $key,bool $tryprod=FALSE) { $this->url = (config('app.env') == 'local' && ! $tryprod) ? 'https://reseller-api.sandbox.ds.network' : 'https://reseller-api.ds.network'; diff --git a/src/Response/Base.php b/src/Response/Base.php index e3f6b9f..0c1852d 100644 --- a/src/Response/Base.php +++ b/src/Response/Base.php @@ -9,7 +9,7 @@ use Illuminate\Support\Facades\Log; use Dreamscape\Models\{Customer,Domain}; /** - * This parent class handles responses received from Trello + * This parent class handles responses received from Dreamscape * * @note: This class is used for events not specifically created. */