using Sepehr.ApiGateway.Partners.Contracts.Flight.Availability.V17.SearchByRouteAndDate.RequestModel;
using Sepehr.ApiGateway.Partners.Contracts.Flight.Availability.V17.SearchByRouteAndDate.ResponseModel;
using SepehrFlightApiSampleClient.BuiltinTypeExtensions;

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

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