using BookingModule.FeatureAccess;
using ThirdPartyBookingMockFeature.Mapping;
using ThirdPartyBookingMockFeature.ThirdPartyBookingServiceReference;

namespace ThirdPartyBookingMockFeature.FeatureAccess
{
    public class ThirdPartyBookingFeatureAccessManager : IBookingFeatureAccessManager
    {
        public BookingModule.Entity.AvailabilityResponse GetAvailability(BookingModule.Entity.AvailabilityRequest request)
        {
            BookingServiceClient client = new BookingServiceClient();
            AvailabilityResponse response = client.GetAvailability(AvailabilityRequestMap.EntityToService(request));
            return AvailabilityResponseMap.ServiceToEntity(response);
        }
    }
}
