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

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

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