Class: Dependencies::Kenui::EmailNotification
- Inherits:
-
Object
- Object
- Dependencies::Kenui::EmailNotification
- Defined in:
- app/services/dependencies/kenui.rb
Constant Summary collapse
- ERROR_MESSAGE =
I18n.translate('errors.messages.email_notification_plugin_not_available')
Class Method Summary collapse
- .email_notification_plugin_available?(options_for_klient) ⇒ Boolean
- .get_configuration_per_account(account_id, options_for_klient) ⇒ Object
- .get_events_to_consider(options_for_klient) ⇒ Object
- .set_configuration_per_account(account_id, event_types, kb_username, reason, comment, options_for_klient) ⇒ Object
Class Method Details
.email_notification_plugin_available?(options_for_klient) ⇒ Boolean
8 9 10 11 12 13 |
# File 'app/services/dependencies/kenui.rb', line 8 def email_notification_plugin_available?() is_available = ::Kenui::EmailNotificationService.email_notification_plugin_available?() [is_available, is_available ? nil : ERROR_MESSAGE] rescue StandardError [false, ERROR_MESSAGE] end |
.get_configuration_per_account(account_id, options_for_klient) ⇒ Object
32 33 34 35 36 |
# File 'app/services/dependencies/kenui.rb', line 32 def get_configuration_per_account(account_id, ) ::Kenui::EmailNotificationService.get_configuration_per_account(account_id, ) rescue StandardError [] end |
.get_events_to_consider(options_for_klient) ⇒ Object
26 27 28 29 30 |
# File 'app/services/dependencies/kenui.rb', line 26 def get_events_to_consider() ::Kenui::EmailNotificationService.get_events_to_consider() rescue StandardError {} end |
.set_configuration_per_account(account_id, event_types, kb_username, reason, comment, options_for_klient) ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'app/services/dependencies/kenui.rb', line 15 def set_configuration_per_account(account_id, event_types, kb_username, reason, comment, ) ::Kenui::EmailNotificationService.set_configuration_per_account(account_id, event_types, kb_username, reason, comment, ) rescue StandardError [false, ERROR_MESSAGE] end |