Class: Bandwidth::CallRecordingMetadata
- Defined in:
- lib/bandwidth/voice_lib/voice/models/call_recording_metadata.rb
Overview
CallRecordingMetadata Model.
Instance Attribute Summary collapse
-
#account_id ⇒ String
TODO: Write general description for this method.
-
#application_id ⇒ String
TODO: Write general description for this method.
-
#call_id ⇒ String
TODO: Write general description for this method.
-
#channels ⇒ Integer
Format is ISO-8601.
-
#direction ⇒ DirectionEnum
Format is ISO-8601.
-
#duration ⇒ String
Format is ISO-8601.
-
#end_time ⇒ DateTime
Format is ISO-8601.
-
#file_format ⇒ FileFormatEnum
Format is ISO-8601.
-
#from ⇒ String
TODO: Write general description for this method.
-
#media_url ⇒ String
The current status of the recording.
-
#parent_call_id ⇒ String
TODO: Write general description for this method.
-
#recording_id ⇒ String
TODO: Write general description for this method.
-
#start_time ⇒ DateTime
Format is ISO-8601.
-
#status ⇒ String
The current status of the recording.
-
#to ⇒ String
TODO: Write general description for this method.
-
#transcription ⇒ TranscriptionMetadata
The current status of the recording.
-
#transfer_caller_id ⇒ String
TODO: Write general description for this method.
-
#transfer_to ⇒ 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(application_id = nil, account_id = nil, call_id = nil, parent_call_id = nil, recording_id = nil, to = nil, from = nil, transfer_caller_id = nil, transfer_to = nil, duration = nil, direction = nil, channels = nil, start_time = nil, end_time = nil, file_format = nil, status = nil, media_url = nil, transcription = nil) ⇒ CallRecordingMetadata
constructor
A new instance of CallRecordingMetadata.
- #to_end_time ⇒ Object
- #to_start_time ⇒ Object
Methods inherited from BaseModel
Constructor Details
#initialize(application_id = nil, account_id = nil, call_id = nil, parent_call_id = nil, recording_id = nil, to = nil, from = nil, transfer_caller_id = nil, transfer_to = nil, duration = nil, direction = nil, channels = nil, start_time = nil, end_time = nil, file_format = nil, status = nil, media_url = nil, transcription = nil) ⇒ CallRecordingMetadata
Returns a new instance of CallRecordingMetadata.
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
# File 'lib/bandwidth/voice_lib/voice/models/call_recording_metadata.rb', line 115 def initialize(application_id = nil, account_id = nil, call_id = nil, parent_call_id = nil, recording_id = nil, to = nil, from = nil, transfer_caller_id = nil, transfer_to = nil, duration = nil, direction = nil, channels = nil, start_time = nil, end_time = nil, file_format = nil, status = nil, media_url = nil, transcription = nil) @application_id = application_id @account_id = account_id @call_id = call_id @parent_call_id = parent_call_id @recording_id = recording_id @to = to @from = from @transfer_caller_id = transfer_caller_id @transfer_to = transfer_to @duration = duration @direction = direction @channels = channels @start_time = start_time @end_time = end_time @file_format = file_format @status = status @media_url = media_url @transcription = transcription end |
Instance Attribute Details
#account_id ⇒ String
TODO: Write general description for this method
16 17 18 |
# File 'lib/bandwidth/voice_lib/voice/models/call_recording_metadata.rb', line 16 def account_id @account_id end |
#application_id ⇒ String
TODO: Write general description for this method
12 13 14 |
# File 'lib/bandwidth/voice_lib/voice/models/call_recording_metadata.rb', line 12 def application_id @application_id end |
#call_id ⇒ String
TODO: Write general description for this method
20 21 22 |
# File 'lib/bandwidth/voice_lib/voice/models/call_recording_metadata.rb', line 20 def call_id @call_id end |
#channels ⇒ Integer
Format is ISO-8601
56 57 58 |
# File 'lib/bandwidth/voice_lib/voice/models/call_recording_metadata.rb', line 56 def channels @channels end |
#direction ⇒ DirectionEnum
Format is ISO-8601
52 53 54 |
# File 'lib/bandwidth/voice_lib/voice/models/call_recording_metadata.rb', line 52 def direction @direction end |
#duration ⇒ String
Format is ISO-8601
48 49 50 |
# File 'lib/bandwidth/voice_lib/voice/models/call_recording_metadata.rb', line 48 def duration @duration end |
#end_time ⇒ DateTime
Format is ISO-8601
64 65 66 |
# File 'lib/bandwidth/voice_lib/voice/models/call_recording_metadata.rb', line 64 def end_time @end_time end |
#file_format ⇒ FileFormatEnum
Format is ISO-8601
68 69 70 |
# File 'lib/bandwidth/voice_lib/voice/models/call_recording_metadata.rb', line 68 def file_format @file_format end |
#from ⇒ String
TODO: Write general description for this method
36 37 38 |
# File 'lib/bandwidth/voice_lib/voice/models/call_recording_metadata.rb', line 36 def from @from end |
#media_url ⇒ String
The current status of the recording. Current values are ‘processing’, ‘partial’, ‘complete’, ‘deleted’ and ‘error’. Additional states may be added in the future, so your application must be tolerant of unknown values.
82 83 84 |
# File 'lib/bandwidth/voice_lib/voice/models/call_recording_metadata.rb', line 82 def media_url @media_url end |
#parent_call_id ⇒ String
TODO: Write general description for this method
24 25 26 |
# File 'lib/bandwidth/voice_lib/voice/models/call_recording_metadata.rb', line 24 def parent_call_id @parent_call_id end |
#recording_id ⇒ String
TODO: Write general description for this method
28 29 30 |
# File 'lib/bandwidth/voice_lib/voice/models/call_recording_metadata.rb', line 28 def recording_id @recording_id end |
#start_time ⇒ DateTime
Format is ISO-8601
60 61 62 |
# File 'lib/bandwidth/voice_lib/voice/models/call_recording_metadata.rb', line 60 def start_time @start_time end |
#status ⇒ String
The current status of the recording. Current values are ‘processing’, ‘partial’, ‘complete’, ‘deleted’ and ‘error’. Additional states may be added in the future, so your application must be tolerant of unknown values.
75 76 77 |
# File 'lib/bandwidth/voice_lib/voice/models/call_recording_metadata.rb', line 75 def status @status end |
#to ⇒ String
TODO: Write general description for this method
32 33 34 |
# File 'lib/bandwidth/voice_lib/voice/models/call_recording_metadata.rb', line 32 def to @to end |
#transcription ⇒ TranscriptionMetadata
The current status of the recording. Current values are ‘processing’, ‘partial’, ‘complete’, ‘deleted’ and ‘error’. Additional states may be added in the future, so your application must be tolerant of unknown values.
89 90 91 |
# File 'lib/bandwidth/voice_lib/voice/models/call_recording_metadata.rb', line 89 def transcription @transcription end |
#transfer_caller_id ⇒ String
TODO: Write general description for this method
40 41 42 |
# File 'lib/bandwidth/voice_lib/voice/models/call_recording_metadata.rb', line 40 def transfer_caller_id @transfer_caller_id end |
#transfer_to ⇒ String
TODO: Write general description for this method
44 45 46 |
# File 'lib/bandwidth/voice_lib/voice/models/call_recording_metadata.rb', line 44 def transfer_to @transfer_to end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 |
# File 'lib/bandwidth/voice_lib/voice/models/call_recording_metadata.rb', line 154 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. application_id = hash['applicationId'] account_id = hash['accountId'] call_id = hash['callId'] parent_call_id = hash['parentCallId'] recording_id = hash['recordingId'] to = hash['to'] from = hash['from'] transfer_caller_id = hash['transferCallerId'] transfer_to = hash['transferTo'] duration = hash['duration'] direction = hash['direction'] channels = hash['channels'] start_time = DateTimeHelper.from_rfc3339(hash['startTime']) if hash['startTime'] end_time = DateTimeHelper.from_rfc3339(hash['endTime']) if hash['endTime'] file_format = hash['fileFormat'] status = hash['status'] media_url = hash['mediaUrl'] transcription = TranscriptionMetadata.from_hash(hash['transcription']) if hash['transcription'] # Create object from extracted values. CallRecordingMetadata.new(application_id, account_id, call_id, parent_call_id, recording_id, to, from, transfer_caller_id, transfer_to, duration, direction, channels, start_time, end_time, file_format, status, media_url, transcription) end |
.names ⇒ Object
A mapping from model property names to API property names.
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
# File 'lib/bandwidth/voice_lib/voice/models/call_recording_metadata.rb', line 92 def self.names @_hash = {} if @_hash.nil? @_hash['application_id'] = 'applicationId' @_hash['account_id'] = 'accountId' @_hash['call_id'] = 'callId' @_hash['parent_call_id'] = 'parentCallId' @_hash['recording_id'] = 'recordingId' @_hash['to'] = 'to' @_hash['from'] = 'from' @_hash['transfer_caller_id'] = 'transferCallerId' @_hash['transfer_to'] = 'transferTo' @_hash['duration'] = 'duration' @_hash['direction'] = 'direction' @_hash['channels'] = 'channels' @_hash['start_time'] = 'startTime' @_hash['end_time'] = 'endTime' @_hash['file_format'] = 'fileFormat' @_hash['status'] = 'status' @_hash['media_url'] = 'mediaUrl' @_hash['transcription'] = 'transcription' @_hash end |
Instance Method Details
#to_end_time ⇒ Object
205 206 207 |
# File 'lib/bandwidth/voice_lib/voice/models/call_recording_metadata.rb', line 205 def to_end_time DateTimeHelper.to_rfc3339(end_time) end |
#to_start_time ⇒ Object
201 202 203 |
# File 'lib/bandwidth/voice_lib/voice/models/call_recording_metadata.rb', line 201 def to_start_time DateTimeHelper.to_rfc3339(start_time) end |