Class: TMS::VoiceMessage

Inherits:
Object
  • Object
show all
Includes:
InstanceResource
Defined in:
lib/tms_client/resource/voice_message.rb

Overview

A VoiceMessage is used to create and send a voice message to a collection of Recipient objects. The recipients are called and the provided play_url is played to them. Accepted sound formats include wav, mp3, and aiff.

Examples:

voice_message = client.voice_messages.build(:play_url => "http://example.com/emergency_weather.mp3")
voice_message.recipients.build(:phone => "+18001002000")
voice_message.post
voice_message.get

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from InstanceResource

included

Instance Attribute Details

#completed_atObject (readonly)

Returns the value of attribute completed_at.



1
2
3
# File 'lib/tms_client/resource/voice_message.rb', line 1

def completed_at
  @completed_at
end

#created_atObject (readonly)

Returns the value of attribute created_at.



1
2
3
# File 'lib/tms_client/resource/voice_message.rb', line 1

def created_at
  @created_at
end

#play_urlString

The url to the sound file to be played back to the call recipients

Returns:

  • (String)

    the current value of play_url



14
15
16
# File 'lib/tms_client/resource/voice_message.rb', line 14

def play_url
  @play_url
end

#statusObject (readonly)

Returns the value of attribute status.



1
2
3
# File 'lib/tms_client/resource/voice_message.rb', line 1

def status
  @status
end

Class Method Details

.to_sObject



27
28
29
# File 'lib/tms_client/resource/voice_message.rb', line 27

def self.to_s
  "VoiceMessage"
end

Instance Method Details

#recipientsObject

A CollectionResource of Recipient objects



25
# File 'lib/tms_client/resource/voice_message.rb', line 25

collection_attributes :recipients