def update_by(hotel_id: int, **payload): payload = accepts_logic( payload=payload, temp={ 'hotel_id': hotel_id }, schema=HotelUpdateBy ) HotelRepository.update_by(hotel_id, **payload)
def create(payload: dict) -> TourPaymentInformation: payload = accepts_logic(payload=payload, schema=TourPaymentInformationCreate) result = TourPaymentInformationRepository.create(payload) return result
def update_by(tour_id: int, **payload): payload = accepts_logic(payload=payload, temp={'tour_id': tour_id}, schema=TourUpdateBy) TourRepository.update_by(tour_id, **payload)
def create(payload: dict) -> Tour: payload = accepts_logic(payload=payload, schema=TourCreate) tour = TourRepository.create(payload) return tour
def create(payload: dict) -> TourBooking: payload = accepts_logic(payload=payload, schema=TourBookingCreate) booking = TourBookingRepository.create(payload) return booking
def create(payload: dict) -> Hotel: payload = accepts_logic(payload=payload, schema=HotelCreate) hotel = HotelRepository.create(payload) return hotel