Module: SmsBroker

Extended by:
Configuration
Defined in:
lib/sms_broker.rb,
lib/sms_broker/setup.rb,
lib/sms_broker/service.rb,
lib/sms_broker/version.rb,
lib/sms_broker/client/base.rb,
lib/sms_broker/client/nexmo.rb,
lib/sms_broker/client/twilio.rb,
lib/sms_broker/configuration.rb,
lib/sms_broker/message_sender.rb,
lib/sms_broker/status_requester.rb,
lib/sms_broker/client/open_market.rb,
lib/sms_broker/voice_message_sender.rb,
lib/sms_broker/client/response/error.rb,
lib/sms_broker/client/response/success.rb,
lib/sms_broker/exceptions/invalid_setup.rb,
lib/sms_broker/exceptions/invalid_service.rb,
lib/sms_broker/exceptions/not_implemented.rb,
lib/sms_broker/client/response/nexmo_error.rb,
lib/sms_broker/client/response/twilio_error.rb,
lib/sms_broker/client/response/nexmo_success.rb,
lib/sms_broker/client/response/voice_success.rb,
lib/sms_broker/client/response/twilio_success.rb,
lib/sms_broker/client/response/nexmo_voice_error.rb,
lib/sms_broker/client/response/open_market/error.rb,
lib/sms_broker/client/response/nexmo_voice_success.rb,
lib/sms_broker/client/response/message_status_success.rb,
lib/sms_broker/client/response/open_market/send_message_success.rb,
lib/sms_broker/client/response/open_market/message_status_success.rb

Defined Under Namespace

Modules: Client, Configuration, Exceptions Classes: MessageSender, Service, Setup, StatusRequester, VoiceMessageSender

Constant Summary collapse

CLIENTS =
{
  nexmo: Client::Nexmo,
  twilio: Client::Twilio,
  open_market: Client::OpenMarket
}.freeze
VERSION =
'1.0.8'.freeze

Class Method Summary collapse

Methods included from Configuration

clear_setup, configuration, default_service, setup, setup!

Class Method Details

.message(body) ⇒ Object



21
22
23
# File 'lib/sms_broker.rb', line 21

def message(body)
  service.message(body)
end

.service(name = default_service) ⇒ Object



17
18
19
# File 'lib/sms_broker.rb', line 17

def service(name = default_service)
  Service.get(name)
end

.voice_message(body) ⇒ Object



25
26
27
# File 'lib/sms_broker.rb', line 25

def voice_message(body)
  service.voice_message(body)
end