Module: Esendex
- Defined in:
- lib/esendex/message.rb,
lib/esendex.rb,
lib/esendex/engine.rb,
lib/esendex/account.rb,
lib/esendex/railtie.rb,
lib/esendex/version.rb,
lib/esendex/exceptions.rb,
lib/esendex/voice_message.rb,
lib/esendex/api_connection.rb,
lib/esendex/inbound_message.rb,
lib/esendex/dispatcher_result.rb,
lib/esendex/hash_serialisation.rb,
lib/esendex/message_failed_event.rb,
lib/esendex/message_delivered_event.rb,
lib/esendex/message_batch_submission.rb,
app/controllers/esendex/application_controller.rb,
app/controllers/esendex/push_notification_handler.rb,
app/controllers/esendex/inbound_messages_controller.rb,
app/controllers/esendex/message_failed_events_controller.rb,
app/controllers/esendex/message_delivered_events_controller.rb
Overview
Common behaviour for all push notification controllers
Defined Under Namespace
Modules: HashSerialisation, PushNotificationHandler Classes: Account, AccountReferenceError, ApiConnection, ApiError, ApiErrorFactory, ApplicationController, DispatcherResult, Engine, ForbiddenError, InboundMessage, InboundMessagesController, Message, MessageBatchSubmission, MessageDeliveredEvent, MessageDeliveredEventsController, MessageFailedEvent, MessageFailedEventsController, NotAuthorizedError, Railtie, VoiceMessage
Constant Summary collapse
- API_NAMESPACE =
'http://api.esendex.com/ns/'
- API_HOST =
'https://api.esendex.com'
- VERSION =
"0.5.0"
Class Attribute Summary collapse
- .account_reference ⇒ Object
-
.inbound_message_handler ⇒ Object
lambdas for handling push notifications.
-
.message_delivered_event_handler ⇒ Object
lambdas for handling push notifications.
-
.message_failed_event_handler ⇒ Object
lambdas for handling push notifications.
- .password ⇒ Object
-
.suppress_error_backtrace ⇒ Object
behaviour config.
- .username ⇒ Object
Class Method Summary collapse
-
.configure {|_self| ... } ⇒ Object
Public - used to configure the gem prior to use.
- .user_agent ⇒ Object
Class Attribute Details
.account_reference ⇒ Object
47 48 49 |
# File 'lib/esendex.rb', line 47 def account_reference @account_reference ||= ENV['ESENDEX_ACCOUNT'] end |
.inbound_message_handler ⇒ Object
lambdas for handling push notifications
42 43 44 |
# File 'lib/esendex.rb', line 42 def end |
.message_delivered_event_handler ⇒ Object
lambdas for handling push notifications
42 43 44 |
# File 'lib/esendex.rb', line 42 def end |
.message_failed_event_handler ⇒ Object
lambdas for handling push notifications
42 43 44 |
# File 'lib/esendex.rb', line 42 def end |
.password ⇒ Object
55 56 57 |
# File 'lib/esendex.rb', line 55 def password @password ||= ENV['ESENDEX_PASSWORD'] end |
.suppress_error_backtrace ⇒ Object
behaviour config
45 46 47 |
# File 'lib/esendex.rb', line 45 def suppress_error_backtrace @suppress_error_backtrace end |
.username ⇒ Object
51 52 53 |
# File 'lib/esendex.rb', line 51 def username @username ||= ENV['ESENDEX_USERNAME'] end |
Class Method Details
.configure {|_self| ... } ⇒ Object
Public - used to configure the gem prior to use
Esendex.configure do |config|
config.username = 'username'
config.password = 'password'
config.account_reference = 'account reference'
end
33 34 35 |
# File 'lib/esendex.rb', line 33 def self.configure yield self if block_given? end |
.user_agent ⇒ Object
60 61 62 |
# File 'lib/esendex.rb', line 60 def self.user_agent "EsendexRubyGem/#{Esendex::VERSION}" end |