using Sepehr.ApiGateway.Partners.Contracts.Flight.RetrieveBooking.V3.GetHistory.RequestModel;
using Sepehr.ApiGateway.Partners.Contracts.Flight.RetrieveBooking.V3.GetHistory.ResponseModel;
using SepehrFlightApiSampleClient.BuiltinTypeExtensions;

namespace SepehrFlightApiSampleClient.RetrieveBooking.WebApi
{
    public class GetHistoryApi
    {
        public static Response Post(string url, Request request)
        {
            var response = HttpClientHelper.Post(
                $"{url}/api/Partners/Flight/RetrieveBooking/V3/GetHistory",
                request.SerializeToJson());

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