def get_customer_reservation(fromDate: str, toDate: str, customer_id: str): current_app.logger.debug("Filtering by: {}".format( [fromDate, toDate, customer_id])) # bind filter params... url = "{}?user_id={}".format(BOOKING_MICROSERVICE_URL, customer_id) if fromDate: url = HttpUtils.append_query(url, "fromDate", fromDate) if toDate: url = HttpUtils.append_query(url, "toDate", toDate) response = HttpUtils.make_get_request(url) return response
def get_reservation_rest(restaurant_id, from_date, to_date): """ This method contains the logic to find all reservation in the restaurant with the filter on the date """ url = "{}/list/{}".format(BOOKING_MICROSERVICE_URL, restaurant_id) if from_date: url = HttpUtils.append_query(url, "fromDate", from_date) if to_date: url = HttpUtils.append_query(url, "toDate", to_date) response = HttpUtils.make_get_request(url) return response