using Sepehr.ApiGateway.Partners.Contracts.Hotel.Booking.V2.Book.RequestModel;
using Sepehr.ApiGateway.Partners.Contracts.Hotel.Booking.V2.Book.ResponseModel;
using SepehrHotelApiSampleClient.BuiltinTypeExtensions;

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

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