using Sepehr.ApiGateway.Partners.Contracts.Flight.Booking.V12.Book.RequestModel;
using Sepehr.ApiGateway.Partners.Contracts.Flight.Booking.V12.Book.ResponseModel;
using SepehrFlightApiSampleClient.BuiltinTypeExtensions;

namespace SepehrFlightApiSampleClient.Booking.WebApi
{
    public class BookApi
    {
        public static Response Post(string url, Request request)
        {
            var response = HttpClientHelper.Post(
                $"{url}/api/Partners/Flight/Booking/V12/Book",
                request.SerializeToJson());

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