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

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

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