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

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

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