using Sepehr.ApiGateway.Partners.Contracts.Hotel.Availability.V2.DateRange.RequestModel;
using Sepehr.ApiGateway.Partners.Contracts.Hotel.Availability.V2.DateRange.ResponseModel;
using SepehrHotelApiSampleClient.BuiltinTypeExtensions;

namespace SepehrHotelApiSampleClient.Availability.GetByDateRange.WebApi
{
    public class GetByDateRangeApi
    {
        public static Response Post(string url, Request request)
        {
            var response = HttpClientHelper.Post(
                $"{url}/api/Partners/Hotel/Availability/V2/GetByDateRange",
                request.SerializeToJson());

            return response.DeserializeFromJson<Response>();
        }
    }
}
