예제 #1
0
        public Task <IEnumerable <SlotResponse> > GetSlotsAsync(string serviceId, string regionId, string branchId)
        {
            var request = new GetSlotsRequest()
            {
                ServiceId = serviceId,
                RegionId  = regionId,
                BranchId  = branchId,
                StartDate = DateTime.UtcNow,
                EndDate   = DateTime.UtcNow.AddDays(31)
            };
            var requestMessage = new HttpRequestMessage(HttpMethod.Post, "Booking/GetSlots")
            {
                Content = JsonContent.Create(request)
            };

            return(ProcessRequestAsync <IEnumerable <SlotResponse> >(requestMessage));
        }
예제 #2
0
        public Task <IEnumerable <SlotResponse> > GetSlotsAsync(string serviceId, string regionId, string branchId)
        {
            var request = new GetSlotsRequest()
            {
                ServiceId = serviceId,
                RegionId  = regionId,
                BranchId  = branchId,
                StartDate = DateTime.UtcNow,
                EndDate   = DateTime.UtcNow.AddDays(31)
            };
            var requestMessage = new HttpRequestMessage(HttpMethod.Post, "Booking/GetSlots")
            {
                Content = new StringContent(JsonConvert.SerializeObject(request), Encoding.UTF8, "application/json")
            };

            return(ProcessRequestAsync <IEnumerable <SlotResponse> >(requestMessage));
        }