Class: Keysms::SMS

Inherits:
KeyteqService show all
Defined in:
lib/keysms.rb

Instance Attribute Summary

Attributes inherited from KeyteqService

#result

Instance Method Summary collapse

Methods inherited from KeyteqService

#authenticate, #initialize

Constructor Details

This class inherits a constructor from Keysms::KeyteqService

Instance Method Details

#send(message, receivers, options = {}) ⇒ Object



90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/keysms.rb', line 90

def send(message, receivers, options = {})
  @options = @options.merge(options)
  @options[:path] = "/messages"

  if (receivers.is_a? String)
    receivers = [receivers]
  end

  @payload[:message] = message
  @payload[:receivers] = receivers

  prepare_request
  prepare_session
  call
end