Module: Tolliver
- Defined in:
- lib/tolliver/engine.rb,
lib/tolliver.rb,
lib/tolliver/utils/enum.rb,
lib/tolliver/errors/not_found.rb,
lib/tolliver/jobs/delivery_job.rb,
lib/tolliver/errors/bad_request.rb,
app/models/tolliver/notification.rb,
lib/tolliver/models/notification.rb,
lib/tolliver/services/methods/sms.rb,
lib/tolliver/errors/standard_error.rb,
lib/tolliver/jobs/batch_policy_job.rb,
lib/tolliver/services/methods/email.rb,
lib/tolliver/services/policies/batch.rb,
lib/tolliver/services/delivery_service.rb,
lib/tolliver/services/methods/sms/plivo.rb,
app/mailers/tolliver/notification_mailer.rb,
lib/tolliver/mailers/notification_mailer.rb,
lib/tolliver/services/methods/email/smtp.rb,
lib/tolliver/services/policies/instantly.rb,
app/models/tolliver/notification_delivery.rb,
app/models/tolliver/notification_receiver.rb,
app/models/tolliver/notification_template.rb,
lib/tolliver/models/notification_delivery.rb,
lib/tolliver/models/notification_receiver.rb,
lib/tolliver/models/notification_template.rb,
lib/tolliver/services/notification_service.rb,
app/models/tolliver/notification_attachment.rb,
lib/tolliver/models/notification_attachment.rb,
lib/tolliver/services/methods/email/mailgun.rb
Overview
- Copyright (c) 2019 Matěj Outlý
- Mailgun e-mail provider
- Author: Matěj Outlý
- Date : 1. 12. 2017
Defined Under Namespace
Modules: Errors, Jobs, Mailers, Models, Services, Utils
Classes: Engine, Notification, NotificationAttachment, NotificationDelivery, NotificationMailer, NotificationReceiver, NotificationTemplate
Constant Summary
collapse
- @@notification_model =
"Tolliver::Notification"
- @@notification_attachment_model =
"Tolliver::NotificationAttachment"
- @@notification_delivery_model =
"Tolliver::NotificationDelivery"
- @@notification_receiver_model =
"Tolliver::NotificationReceiver"
- @@notification_template_model =
"Tolliver::NotificationTemplate"
- @@delivery_methods =
[
:email
]
- @@load_balance =
nil
- @@email_provider =
:smtp
- @@email_provider_params =
{}
- @@sms_provider =
nil
- @@sms_provider_params =
{}
Class Method Summary
collapse
Class Method Details
.deliver(notification) ⇒ Object
62
63
64
|
# File 'lib/tolliver.rb', line 62
def self.deliver(notification)
Tolliver::Services::DeliveryService.instance.deliver(notification)
end
|
.enqueue_for_delivery(notification) ⇒ Object
66
67
68
|
# File 'lib/tolliver.rb', line 66
def self.enqueue_for_delivery(notification)
Tolliver::Services::DeliveryService.instance.enqueue_for_delivery(notification)
end
|
.notification_attachment_model ⇒ Object
99
100
101
|
# File 'lib/tolliver.rb', line 99
def self.notification_attachment_model
return @@notification_attachment_model.constantize
end
|
.notification_delivery_model ⇒ Object
108
109
110
|
# File 'lib/tolliver.rb', line 108
def self.notification_delivery_model
return @@notification_delivery_model.constantize
end
|
.notification_model ⇒ Object
90
91
92
|
# File 'lib/tolliver.rb', line 90
def self.notification_model
return @@notification_model.constantize
end
|
.notification_receiver_model ⇒ Object
117
118
119
|
# File 'lib/tolliver.rb', line 117
def self.notification_receiver_model
return @@notification_receiver_model.constantize
end
|
.notification_template_model ⇒ Object
126
127
128
|
# File 'lib/tolliver.rb', line 126
def self.notification_template_model
return @@notification_template_model.constantize
end
|
.notify(options) ⇒ Object
58
59
60
|
# File 'lib/tolliver.rb', line 58
def self.notify(options)
Tolliver::Services::NotificationService.instance.notify(options)
end
|
.reset_delivery(notification) ⇒ Object
70
71
72
|
# File 'lib/tolliver.rb', line 70
def self.reset_delivery(notification)
Tolliver::Services::DeliveryService.instance.reset_delivery(notification)
end
|
.setup {|_self| ... } ⇒ Object
Default way to setup module
79
80
81
|
# File 'lib/tolliver.rb', line 79
def self.setup
yield self
end
|
.table_name_prefix ⇒ Object
This will keep Rails Engine from generating all table prefixes with the engines name
51
52
|
# File 'lib/tolliver.rb', line 51
def self.table_name_prefix
end
|