using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BookingModule.FeatureAccess;
using ThirdPartyBookingFeature.Mapping;
using ThirdPartyBookingFeature.ThirdPartyBookingServiceReference;
using AvailabilityRequest = BookingModule.Entity.AvailabilityRequest;
using AvailabilityResponse = BookingModule.Entity.AvailabilityResponse;


namespace ThirdPartyBookingFeature.FeatureAccess
{
    public class ThirdPartyBookingFeatureAccessManager : IBookingFeatureAccessManager
    {
        public AvailabilityResponse GetAvailability(AvailabilityRequest request)
        {
            BookingClient client = new BookingClient();
            ThirdPartyBookingServiceReference.AvailabilityResponse response = client.GetAvailability(AvailabilityRequestMap.EntityToService(request));
            return AvailabilityResponseMap.ServiceToEntity(response);
        }
    }
}
