using Sepehr.ApiGateway.Partners.Contracts.Hotel.Availability.V2.SearchByCityAndDate.RequestModel;
using Sepehr.ApiGateway.Partners.Contracts.Hotel.Availability.V2.SearchByCityAndDate.ResponseModel;
using SepehrHotelApiSampleClient.BuiltinTypeExtensions;

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

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