mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 04:24:12 +00:00
32 lines
740 B
PHP
32 lines
740 B
PHP
<?php
|
|
|
|
namespace App\Classes\Modules\Unity\Services;
|
|
|
|
use Config;
|
|
use Illuminate\Support\Facades\Http;
|
|
use App\Classes\Modules\Unity\Services\GetAccessToken;
|
|
|
|
class GetContractObligations
|
|
{
|
|
private $unityConfig;
|
|
|
|
private $getAccessToken;
|
|
|
|
public function __construct(GetAccessToken $getAccessToken)
|
|
{
|
|
$this->unityConfig = Config::get('unity');
|
|
$this->getAccessToken = $getAccessToken;
|
|
}
|
|
|
|
public function execute(){
|
|
|
|
$accesToken=$this->getAccessToken->execute();
|
|
|
|
$response = Http::withToken($accesToken)->get($this->unityConfig['url'].$this->unityConfig['steps_endpoint'])->object();
|
|
$orderSteps = [];
|
|
|
|
return (isset($response->data)) ? $response->data : [];
|
|
|
|
}
|
|
}
|