Class: Eztexting::Voice

Inherits:
Base
  • Object
show all
Defined in:
lib/eztexting/voice.rb

Class Method Summary collapse

Methods inherited from Base

do_post, processed_reponse

Class Method Details

.broadcast(opts = {}) ⇒ Array

Use the Voicebroadcast feature of the API

Parameters:

  • This (Hash)

    has needs the following keys, phonenumbers to call, the recording src and the caller_id value

Returns:

  • (Array)

    The return is an array of two elements, the mapped error code according to the extexting and the raw response



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/eztexting/voice.rb', line 7

def self.broadcast(opts={})
  location = "/voicemessages/"
  
  options = {
    :phonenumbers => phone_numbers,
    :soundsource => opts[:recording],
    :callerid => opts[:called_id]
  }
  response = self.do_post(location,options)
  response_result = self.process(response)

  return self.processed_reponse(response_result,response)
end