using Sepehr.ApiGateway.Partners.Contracts.Hotel.Availability.V4.SearchByCityAndDateAndGuests.RequestModel;
using Sepehr.ApiGateway.Partners.Contracts.Hotel.Availability.V4.SearchByCityAndDateAndGuests.ResponseModel;
using SepehrHotelApiSampleClient.BuiltinTypeExtensions;

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

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