Class: Bandwidth::Transcription
- Defined in:
- lib/bandwidth/voice_lib/voice/models/transcription.rb
Overview
Transcription Model.
Instance Attribute Summary collapse
-
#completed_time ⇒ String
TODO: Write general description for this method.
-
#id ⇒ String
TODO: Write general description for this method.
-
#status ⇒ Status3Enum
TODO: Write general description for this method.
-
#url ⇒ String
TODO: Write general description for this method.
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) ⇒ Transcription
constructor
A new instance of Transcription.
Methods inherited from BaseModel
Constructor Details
#initialize(id = nil, status = nil, completed_time = nil, url = nil) ⇒ Transcription
Returns a new instance of Transcription.
35 36 37 38 39 40 41 42 43 |
# File 'lib/bandwidth/voice_lib/voice/models/transcription.rb', line 35 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
TODO: Write general description for this method
19 20 21 |
# File 'lib/bandwidth/voice_lib/voice/models/transcription.rb', line 19 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.rb', line 11 def id @id end |
#status ⇒ Status3Enum
TODO: Write general description for this method
15 16 17 |
# File 'lib/bandwidth/voice_lib/voice/models/transcription.rb', line 15 def status @status end |
#url ⇒ String
TODO: Write general description for this method
23 24 25 |
# File 'lib/bandwidth/voice_lib/voice/models/transcription.rb', line 23 def url @url end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/bandwidth/voice_lib/voice/models/transcription.rb', line 46 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. Transcription.new(id, status, completed_time, url) end |
.names ⇒ Object
A mapping from model property names to API property names.
26 27 28 29 30 31 32 33 |
# File 'lib/bandwidth/voice_lib/voice/models/transcription.rb', line 26 def self.names @_hash = {} if @_hash.nil? @_hash['id'] = 'id' @_hash['status'] = 'status' @_hash['completed_time'] = 'completedTime' @_hash['url'] = 'url' @_hash end |