<?php
namespace App\Services;
use App\Traits\ConsumeExternalService;
class AvailableHotelsService
{
/**
* The base uri to consume authors service
* @var string
*/
public $baseUri;
/**
* Authorization secret to pass to author api - this example not using any authorizations its for future if we need
* @var string
*/
public $secret;
use ConsumeExternalService;
public function __construct()
{
/**
* get base url for micro-service and secret
*/
$this->baseUri = config('services.available_hotels.base_uri');
$this->secret = config('services.available_hotels.secret');
}
public function obtainAvailableHotels($options = [])
{
return $this->performRequest('GET', "/available", $options);
}
public function searchInAvailableHotels($options = [])
{
return $this->performRequest('GET', "/search", $options);
}
}
|