Class: VoiceML::RecordingAudio

Inherits:
Object
  • Object
show all
Defined in:
lib/voiceml/models/recordings.rb

Overview

Result of fetching ‘GET /Recordings/Sid.wav`. Wraps the WAV bytes with the response’s content-type and whether we followed a 302 -> S3 redirect to retrieve them.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(sid:, content:, content_type:, via_redirect:) ⇒ RecordingAudio

Returns a new instance of RecordingAudio.



52
53
54
55
56
57
# File 'lib/voiceml/models/recordings.rb', line 52

def initialize(sid:, content:, content_type:, via_redirect:)
  @sid          = sid
  @content      = content
  @content_type = content_type
  @via_redirect = via_redirect
end

Instance Attribute Details

#contentObject (readonly)

Returns the value of attribute content.



50
51
52
# File 'lib/voiceml/models/recordings.rb', line 50

def content
  @content
end

#content_typeObject (readonly)

Returns the value of attribute content_type.



50
51
52
# File 'lib/voiceml/models/recordings.rb', line 50

def content_type
  @content_type
end

#sidObject (readonly)

Returns the value of attribute sid.



50
51
52
# File 'lib/voiceml/models/recordings.rb', line 50

def sid
  @sid
end

#via_redirectObject (readonly)

Returns the value of attribute via_redirect.



50
51
52
# File 'lib/voiceml/models/recordings.rb', line 50

def via_redirect
  @via_redirect
end