using Sepehr.ApiGateway.Partners.Contracts.Flight.BulkAvailability.V17.GetClosedFlights.RequestModel;
using Sepehr.ApiGateway.Partners.Contracts.Flight.BulkAvailability.V17.GetClosedFlights.ResponseModel;
using SepehrFlightApiSampleClient.BuiltinTypeExtensions;

namespace SepehrFlightApiSampleClient.BulkAvailability.WebApi
{
    public class GetClosedFlightsApi
    {
        public static Response Post(string url, Request request)
        {
            var response = HttpClientHelper.Post(
                $"{url}/api/Partners/Flight/BulkAvailability/V17/GetClosedFlights",
                request.SerializeToJson());

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