PHP Classes

File: apps/ApiGateway/app/Services/AvailableHotelsService.php

Recommend this page to a friend!
  Classes of mohammad anzawi   PHP Hotel Booking Available   apps/ApiGateway/app/Services/AvailableHotelsService.php   Download  
File: apps/ApiGateway/app/Services/AvailableHotelsService.php
Role: Class source
Content type: text/plain
Description: Class source
Class: PHP Hotel Booking Available
Search for hotels that are available for booking
Author: By
Last change:
Date: 2 years ago
Size: 957 bytes
 

Contents

Class file image Download
<?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);
    }
}