using Sepehr.ApiGateway.Partners.Contracts.Flight.Availability.V15.DateRange.GetFlightCount.RequestModel;
using Sepehr.ApiGateway.Partners.Contracts.Flight.Availability.V15.DateRange.GetFlightCount.ResponseModel;
using SepehrFlightApiSampleClient.BuiltinTypeExtensions;

namespace SepehrFlightApiSampleClient.Availability.WebApi.DateRange.FlightCount
{
    public class GetFlightCountApi
    {
        public static Response Post(string url, Request request)
        {
            var response = HttpClientHelper.Post(
                $"{url}/api/Partners/Flight/Availability/V15/DateRange/GetFlightCount",
                request.SerializeToJson());

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