Module: NotificationWorkers::ReservationModules::UserMadeNoPackageBookingAckFalse

Included in:
NotificationWorkers::Reservation
Defined in:
app/workers/notification_workers/reservation_modules/user_made_no_package_booking_ack_false.rb

Instance Method Summary collapse

Instance Method Details

#no_ack_no_offers_notif_unconfirmed_by_email(rules) ⇒ Object



7
8
9
10
11
12
13
14
# File 'app/workers/notification_workers/reservation_modules/user_made_no_package_booking_ack_false.rb', line 7

def no_ack_no_offers_notif_unconfirmed_by_email(rules)
  # Send to user
  if allow_send_notif_to_user?(receivers: rules[:receiver])
    report["#{__callee__}_to_user"] = safe_call do
      UserMailer.booking_pending(reservation.id).deliver_later!
    end
  end
end

#no_ack_no_offers_notif_unconfirmed_by_sms(rules) ⇒ Object



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'app/workers/notification_workers/reservation_modules/user_made_no_package_booking_ack_false.rb', line 16

def no_ack_no_offers_notif_unconfirmed_by_sms(rules)
  # Send to user
  if allow_send_notif_to_user?(receivers: rules[:receiver])
    report["#{__callee__}_to_user"] = safe_call do
      sms_user_notifier.send_pending_msg_to_user
    end
  end

  # Send to owner
  if rules[:receiver].include?('owner')
    report["#{__callee__}_to_owner"] = safe_call do
      sms_owner_notifier.send_pending_msg_to_restaurant
    end
  end
end