using Sepehr.ApiGateway.Partners.Contracts.Flight.Availability.V13.DateRange.Charter.RequestModel;
using Sepehr.ApiGateway.Partners.Contracts.Flight.Availability.V13.DateRange.Charter.ResponseModel;
using SepehrFlightApiSampleClient.BuiltinTypeExtensions;

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

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