Class: VoiceML::CallTranscription
- Inherits:
-
Object
- Object
- VoiceML::CallTranscription
- Defined in:
- lib/voiceml/models/transcriptions.rb
Overview
Real-time per-call transcription (REST equivalent of ‘<Start><Transcription>`).
Constant Summary collapse
- ATTRIBUTES =
%w[ sid account_sid call_sid name language_code transcription_engine status api_version uri date_created date_updated ].freeze
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ CallTranscription
constructor
A new instance of CallTranscription.
Constructor Details
#initialize(attrs = {}) ⇒ CallTranscription
Returns a new instance of CallTranscription.
15 16 17 18 19 20 |
# File 'lib/voiceml/models/transcriptions.rb', line 15 def initialize(attrs = {}) ATTRIBUTES.each do |field| value = attrs.key?(field) ? attrs[field] : attrs[field.to_sym] instance_variable_set("@#{field}", value) end end |
Class Method Details
.from_hash(hash) ⇒ Object
22 23 24 25 26 |
# File 'lib/voiceml/models/transcriptions.rb', line 22 def self.from_hash(hash) return nil if hash.nil? new(hash) end |