Class: Bandwidth::RecordingMetadataResponse

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/bandwidth/voice_lib/voice/models/recording_metadata_response.rb

Overview

RecordingMetadataResponse Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(account_id = nil, call_id = nil, recording_id = nil, to = nil, from = nil, duration = nil, direction = nil, channels = nil, start_time = nil, end_time = nil, file_format = nil, transcription_status = nil, media_url = nil, transcription_url = nil) ⇒ RecordingMetadataResponse

Returns a new instance of RecordingMetadataResponse.



85
86
87
88
89
90
91
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/recording_metadata_response.rb', line 85

def initialize( = nil,
               call_id = nil,
               recording_id = nil,
               to = nil,
               from = nil,
               duration = nil,
               direction = nil,
               channels = nil,
               start_time = nil,
               end_time = nil,
               file_format = nil,
               transcription_status = nil,
               media_url = nil,
               transcription_url = nil)
  @account_id = 
  @call_id = call_id
  @recording_id = recording_id
  @to = to
  @from = from
  @duration = duration
  @direction = direction
  @channels = channels
  @start_time = start_time
  @end_time = end_time
  @file_format = file_format
  @transcription_status = transcription_status
  @media_url = media_url
  @transcription_url = transcription_url
end

Instance Attribute Details

#account_idString

TODO: Write general description for this method

Returns:

  • (String)


11
12
13
# File 'lib/bandwidth/voice_lib/voice/models/recording_metadata_response.rb', line 11

def 
  @account_id
end

#call_idString

TODO: Write general description for this method

Returns:

  • (String)


15
16
17
# File 'lib/bandwidth/voice_lib/voice/models/recording_metadata_response.rb', line 15

def call_id
  @call_id
end

#channelsInteger

TODO: Write general description for this method

Returns:

  • (Integer)


39
40
41
# File 'lib/bandwidth/voice_lib/voice/models/recording_metadata_response.rb', line 39

def channels
  @channels
end

#directionDirectionEnum

TODO: Write general description for this method

Returns:



35
36
37
# File 'lib/bandwidth/voice_lib/voice/models/recording_metadata_response.rb', line 35

def direction
  @direction
end

#durationString

TODO: Write general description for this method

Returns:

  • (String)


31
32
33
# File 'lib/bandwidth/voice_lib/voice/models/recording_metadata_response.rb', line 31

def duration
  @duration
end

#end_timeLong

TODO: Write general description for this method

Returns:

  • (Long)


47
48
49
# File 'lib/bandwidth/voice_lib/voice/models/recording_metadata_response.rb', line 47

def end_time
  @end_time
end

#file_formatFileFormatEnum

TODO: Write general description for this method

Returns:



51
52
53
# File 'lib/bandwidth/voice_lib/voice/models/recording_metadata_response.rb', line 51

def file_format
  @file_format
end

#fromString

TODO: Write general description for this method

Returns:

  • (String)


27
28
29
# File 'lib/bandwidth/voice_lib/voice/models/recording_metadata_response.rb', line 27

def from
  @from
end

#media_urlString

TODO: Write general description for this method

Returns:

  • (String)


59
60
61
# File 'lib/bandwidth/voice_lib/voice/models/recording_metadata_response.rb', line 59

def media_url
  @media_url
end

#recording_idString

TODO: Write general description for this method

Returns:

  • (String)


19
20
21
# File 'lib/bandwidth/voice_lib/voice/models/recording_metadata_response.rb', line 19

def recording_id
  @recording_id
end

#start_timeLong

TODO: Write general description for this method

Returns:

  • (Long)


43
44
45
# File 'lib/bandwidth/voice_lib/voice/models/recording_metadata_response.rb', line 43

def start_time
  @start_time
end

#toString

TODO: Write general description for this method

Returns:

  • (String)


23
24
25
# File 'lib/bandwidth/voice_lib/voice/models/recording_metadata_response.rb', line 23

def to
  @to
end

#transcription_statusTranscriptionStatusEnum

TODO: Write general description for this method



55
56
57
# File 'lib/bandwidth/voice_lib/voice/models/recording_metadata_response.rb', line 55

def transcription_status
  @transcription_status
end

#transcription_urlString

TODO: Write general description for this method

Returns:

  • (String)


63
64
65
# File 'lib/bandwidth/voice_lib/voice/models/recording_metadata_response.rb', line 63

def transcription_url
  @transcription_url
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



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
# File 'lib/bandwidth/voice_lib/voice/models/recording_metadata_response.rb', line 116

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
   = hash['accountId']
  call_id = hash['callId']
  recording_id = hash['recordingId']
  to = hash['to']
  from = hash['from']
  duration = hash['duration']
  direction = hash['direction']
  channels = hash['channels']
  start_time = hash['startTime']
  end_time = hash['endTime']
  file_format = hash['fileFormat']
  transcription_status = hash['transcriptionStatus']
  media_url = hash['mediaUrl']
  transcription_url = hash['transcriptionUrl']

  # Create object from extracted values.
  RecordingMetadataResponse.new(,
                                call_id,
                                recording_id,
                                to,
                                from,
                                duration,
                                direction,
                                channels,
                                start_time,
                                end_time,
                                file_format,
                                transcription_status,
                                media_url,
                                transcription_url)
end

.namesObject

A mapping from model property names to API property names.



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# File 'lib/bandwidth/voice_lib/voice/models/recording_metadata_response.rb', line 66

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['account_id'] = 'accountId'
  @_hash['call_id'] = 'callId'
  @_hash['recording_id'] = 'recordingId'
  @_hash['to'] = 'to'
  @_hash['from'] = 'from'
  @_hash['duration'] = 'duration'
  @_hash['direction'] = 'direction'
  @_hash['channels'] = 'channels'
  @_hash['start_time'] = 'startTime'
  @_hash['end_time'] = 'endTime'
  @_hash['file_format'] = 'fileFormat'
  @_hash['transcription_status'] = 'transcriptionStatus'
  @_hash['media_url'] = 'mediaUrl'
  @_hash['transcription_url'] = 'transcriptionUrl'
  @_hash
end