Class: Bandwidth::Voice::StartTranscription

Inherits:
Object
  • Object
show all
Includes:
XmlVerb
Defined in:
lib/bandwidth/voice_lib/bxml/verbs/start_transcription.rb

Overview

The StartTranscription verb allows a segment of a call to be transcribed and optionally for the live transcription to be sent off to another destination for additional processing

Instance Method Summary collapse

Methods included from XmlVerb

#compact_hash, #initialize, #method_missing

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Bandwidth::Voice::XmlVerb

Instance Method Details

#to_bxml(xml) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/bandwidth/voice_lib/bxml/verbs/start_transcription.rb', line 9

def to_bxml(xml)
  xml.StartTranscription(compact_hash({
   'name' => name,
   'tracks' => tracks,
   'transcriptionEventUrl' => transcriptionEventUrl,
   'transcriptionEventMethod' => transcriptionEventMethod,
   'username' => username,
   'password' => password,
   'destination' => destination,
   'stabilized' => stabilized
  })) do
    def embedded_xml(xml, property, type)
      if property
        s = if property.is_a?(type)
              then property
            else type.new(property)
              end
        s.to_bxml(xml)
      end
    end
    def nest_verbs_list(xml, property)
      if property
        property.each do |verb|
          verb.to_bxml(xml)
        end
      end
    end
   embedded_xml(xml, custom_params, CustomParam)
   nest_verbs_list(xml, nested_verbs)
  end
end