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(application_id = nil, 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, status = nil, media_url = nil, transcription = nil) ⇒ RecordingMetadataResponse

Returns a new instance of RecordingMetadataResponse.



90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# File 'lib/bandwidth/voice_lib/voice/models/recording_metadata_response.rb', line 90

def initialize(application_id = nil,
                = 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,
               status = nil,
               media_url = nil,
               transcription = nil)
  @application_id = application_id
  @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
  @status = status
  @media_url = media_url
  @transcription = transcription
end

Instance Attribute Details

#account_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 
  @account_id
end

#application_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 application_id
  @application_id
end

#call_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 call_id
  @call_id
end

#channelsInteger

Format is ISO-8601

Returns:

  • (Integer)


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

def channels
  @channels
end

#directionDirectionEnum

Format is ISO-8601

Returns:



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

def direction
  @direction
end

#durationString

Format is ISO-8601

Returns:

  • (String)


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

def duration
  @duration
end

#end_timeLong

Format is ISO-8601

Returns:

  • (Long)


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

def end_time
  @end_time
end

#file_formatFileFormatEnum

Format is ISO-8601

Returns:



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

def file_format
  @file_format
end

#fromString

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 from
  @from
end

#media_urlString

Format is ISO-8601

Returns:

  • (String)


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

def media_url
  @media_url
end

#recording_idString

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 recording_id
  @recording_id
end

#start_timeLong

Format is ISO-8601

Returns:

  • (Long)


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

def start_time
  @start_time
end

#statusStatus1Enum

Format is ISO-8601

Returns:



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

def status
  @status
end

#toString

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 to
  @to
end

#transcriptionTranscription

Format is ISO-8601

Returns:



67
68
69
# File 'lib/bandwidth/voice_lib/voice/models/recording_metadata_response.rb', line 67

def transcription
  @transcription
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



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
152
153
154
155
156
157
158
159
160
# File 'lib/bandwidth/voice_lib/voice/models/recording_metadata_response.rb', line 123

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  application_id = hash['applicationId']
   = 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']
  status = hash['status']
  media_url = hash['mediaUrl']
  transcription = Transcription.from_hash(hash['transcription']) if
    hash['transcription']

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

.namesObject

A mapping from model property names to API property names.



70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# File 'lib/bandwidth/voice_lib/voice/models/recording_metadata_response.rb', line 70

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['application_id'] = 'applicationId'
  @_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['status'] = 'status'
  @_hash['media_url'] = 'mediaUrl'
  @_hash['transcription'] = 'transcription'
  @_hash
end