Module: NotificationWorkers::ReservationModules::GroupBooking
- Included in:
- NotificationWorkers::Reservation
- Defined in:
- app/workers/notification_workers/reservation_modules/group_booking.rb
Overview
typed: ignore frozen_string_literal: true
Instance Method Summary collapse
- #group_booking? ⇒ Boolean
- #no_ack_group_booking_notif_by_email(rules) ⇒ Object
- #no_ack_group_booking_notif_by_sms(rules) ⇒ Object
- #not_group_booking? ⇒ Boolean
Instance Method Details
#group_booking? ⇒ Boolean
5 6 7 |
# File 'app/workers/notification_workers/reservation_modules/group_booking.rb', line 5 def group_booking? reservation.group_booking end |
#no_ack_group_booking_notif_by_email(rules) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'app/workers/notification_workers/reservation_modules/group_booking.rb', line 13 def no_ack_group_booking_notif_by_email(rules) # Send to admin if rules[:receiver].include?('admin') report["#{__callee__}_to_admin"] = safe_call do StaffMailer.assist_group_booking(reservation.id).deliver_later! end end # Send to owner if rules[:receiver].include?('owner') report["#{__callee__}_to_owner"] = safe_call do OwnerMailer.assist_group_booking(reservation.id).deliver_later! end end end |
#no_ack_group_booking_notif_by_sms(rules) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'app/workers/notification_workers/reservation_modules/group_booking.rb', line 29 def no_ack_group_booking_notif_by_sms(rules) # Send to user if allow_send_notif_to_user?(receivers: rules[:receiver]) report["#{__callee__}_to_user"] = safe_call do NotificationService::Sms.new(phones: reservation.phone, reservation: reservation).send_no_ack_group_booking_to_user end end # Send to admin if rules[:receiver].include?('admin') report["#{__callee__}_to_admin"] = safe_call do sms_admin_no_ack_notifier.send_big_group_msg_to_hh end end # Send to owner if rules[:receiver].include?('owner') report["#{__callee__}_to_owner"] = safe_call do sms_owner_notifier.send_big_group_msg_to_owner end end end |
#not_group_booking? ⇒ Boolean
9 10 11 |
# File 'app/workers/notification_workers/reservation_modules/group_booking.rb', line 9 def not_group_booking? reservation.group_booking == false end |