Class: PolicyManager::PortabilityRequest
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- PolicyManager::PortabilityRequest
- Includes:
- AASM, Concerns::ActiveStorageBehavior, Concerns::PaperclipBehavior
- Defined in:
- app/models/policy_manager/portability_request.rb
Instance Method Summary collapse
- #handle_progress ⇒ Object
- #notify_completeness ⇒ Object
- #notify_progress ⇒ Object
- #notify_progress_to_admin ⇒ Object
- #perform_job ⇒ Object
- #user_email ⇒ Object
Instance Method Details
#handle_progress ⇒ Object
34 35 36 37 |
# File 'app/models/policy_manager/portability_request.rb', line 34 def handle_progress notify_progress perform_job end |
#notify_completeness ⇒ Object
51 52 53 |
# File 'app/models/policy_manager/portability_request.rb', line 51 def notify_completeness PortabilityMailer.completed_notification(self.id).deliver_now end |
#notify_progress ⇒ Object
43 44 45 |
# File 'app/models/policy_manager/portability_request.rb', line 43 def notify_progress PortabilityMailer.progress_notification(self.id).deliver_now end |
#notify_progress_to_admin ⇒ Object
47 48 49 |
# File 'app/models/policy_manager/portability_request.rb', line 47 def notify_progress_to_admin PortabilityMailer.admin_notification(self.user.id).deliver_now end |
#perform_job ⇒ Object
39 40 41 |
# File 'app/models/policy_manager/portability_request.rb', line 39 def perform_job ExporterJob.set(queue: :default).perform_later(self.user.id) end |
#user_email ⇒ Object
30 31 32 |
# File 'app/models/policy_manager/portability_request.rb', line 30 def user_email self.user.email end |