Class: Bandwidth::TranscriptionMetadata
- Defined in:
- lib/bandwidth/voice_lib/voice/models/transcription_metadata.rb
Overview
TranscriptionMetadata Model.
Instance Attribute Summary collapse
-
#completed_time ⇒ String
The current status of the transcription.
-
#id ⇒ String
TODO: Write general description for this method.
-
#status ⇒ String
The current status of the transcription.
-
#url ⇒ String
The current status of the transcription.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
Instance Method Summary collapse
-
#initialize(id = nil, status = nil, completed_time = nil, url = nil) ⇒ TranscriptionMetadata
constructor
A new instance of TranscriptionMetadata.
Methods inherited from BaseModel
Constructor Details
#initialize(id = nil, status = nil, completed_time = nil, url = nil) ⇒ TranscriptionMetadata
Returns a new instance of TranscriptionMetadata.
44 45 46 47 48 49 50 51 52 |
# File 'lib/bandwidth/voice_lib/voice/models/transcription_metadata.rb', line 44 def initialize(id = nil, status = nil, completed_time = nil, url = nil) @id = id @status = status @completed_time = completed_time @url = url end |
Instance Attribute Details
#completed_time ⇒ String
The current status of the transcription. Current values are ‘none’, ‘processing’, ‘available’, ‘error’, ‘timeout’, ‘file-size-too-big’, and ‘file-size-too-small’. Additional states may be added in the future, so your application must be tolerant of unknown values.
25 26 27 |
# File 'lib/bandwidth/voice_lib/voice/models/transcription_metadata.rb', line 25 def completed_time @completed_time end |
#id ⇒ String
TODO: Write general description for this method
11 12 13 |
# File 'lib/bandwidth/voice_lib/voice/models/transcription_metadata.rb', line 11 def id @id end |
#status ⇒ String
The current status of the transcription. Current values are ‘none’, ‘processing’, ‘available’, ‘error’, ‘timeout’, ‘file-size-too-big’, and ‘file-size-too-small’. Additional states may be added in the future, so your application must be tolerant of unknown values.
18 19 20 |
# File 'lib/bandwidth/voice_lib/voice/models/transcription_metadata.rb', line 18 def status @status end |
#url ⇒ String
The current status of the transcription. Current values are ‘none’, ‘processing’, ‘available’, ‘error’, ‘timeout’, ‘file-size-too-big’, and ‘file-size-too-small’. Additional states may be added in the future, so your application must be tolerant of unknown values.
32 33 34 |
# File 'lib/bandwidth/voice_lib/voice/models/transcription_metadata.rb', line 32 def url @url end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/bandwidth/voice_lib/voice/models/transcription_metadata.rb', line 55 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. id = hash['id'] status = hash['status'] completed_time = hash['completedTime'] url = hash['url'] # Create object from extracted values. TranscriptionMetadata.new(id, status, completed_time, url) end |
.names ⇒ Object
A mapping from model property names to API property names.
35 36 37 38 39 40 41 42 |
# File 'lib/bandwidth/voice_lib/voice/models/transcription_metadata.rb', line 35 def self.names @_hash = {} if @_hash.nil? @_hash['id'] = 'id' @_hash['status'] = 'status' @_hash['completed_time'] = 'completedTime' @_hash['url'] = 'url' @_hash end |