This commit is contained in:
Bozhidar Slaveykov 2024-04-07 14:48:11 +03:00
parent 0c665c112d
commit 7ac497aab2
3 changed files with 16 additions and 2 deletions

View file

@ -18,6 +18,13 @@ class PhyreApiSDK
$this->username = $username;
}
public function getHostingSubscriptions()
{
$response = $this->sendRequest('hosting-subscriptions', [], 'GET');
return $response;
}
public function getCustomers()
{
$response = $this->sendRequest('customers', [], 'GET');

View file

@ -11,13 +11,13 @@ class HostingSubscriptionsController extends ApiController
{
public function index()
{
$findHostingSubscription = HostingSubscription::all();
$findHostingSubscriptions = HostingSubscription::all();
return response()->json([
'status' => 'ok',
'message' => 'Hosting subscriptions found',
'data' => [
'HostingSubscriptions' => $findHostingSubscription,
'hostingSubscriptions' => $findHostingSubscriptions,
],
]);

View file

@ -82,6 +82,13 @@ class PhyreServer extends Model
}
// Sync Hosting Subscriptions
$getExternalHostingSubscriptions = $phyreApiSDK->getHostingSubscriptions();
if (isset($getExternalHostingSubscriptions['data']['hostingSubscriptions'])) {
dd($getExternalHostingSubscriptions['data']['hostingSubscriptions']);
}
dd($getExternalHostingSubscriptions);
// // Sync Hosting Plans
// $getHostingPlans = HostingPlan::all();