Class: Bandwidth::ConferenceCallback

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

Overview

This object represents all possible fields that may be included in callbacks related to conference events

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(conference_id = nil, name = nil, event_type = nil, event_time = nil, tag = nil, call_id = nil, to = nil, from = nil, account_id = nil, recording_id = nil, channels = nil, start_time = nil, end_time = nil, duration = nil, file_format = nil, media_url = nil, status = nil) ⇒ ConferenceCallback

Returns a new instance of ConferenceCallback.



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
161
162
163
164
165
166
# File 'lib/bandwidth/voice_lib/voice/models/conference_callback.rb', line 132

def initialize(conference_id = nil,
               name = nil,
               event_type = nil,
               event_time = nil,
               tag = nil,
               call_id = nil,
               to = nil,
               from = nil,
                = nil,
               recording_id = nil,
               channels = nil,
               start_time = nil,
               end_time = nil,
               duration = nil,
               file_format = nil,
               media_url = nil,
               status = nil)
  @conference_id = conference_id unless conference_id == SKIP
  @name = name unless name == SKIP
  @event_type = event_type unless event_type == SKIP
  @event_time = event_time unless event_time == SKIP
  @tag = tag unless tag == SKIP
  @call_id = call_id unless call_id == SKIP
  @to = to unless to == SKIP
  @from = from unless from == SKIP
  @account_id =  unless  == SKIP
  @recording_id = recording_id unless recording_id == SKIP
  @channels = channels unless channels == SKIP
  @start_time = start_time unless start_time == SKIP
  @end_time = end_time unless end_time == SKIP
  @duration = duration unless duration == SKIP
  @file_format = file_format unless file_format == SKIP
  @media_url = media_url unless media_url == SKIP
  @status = status unless status == SKIP
end

Instance Attribute Details

#account_idString

TODO: Write general description for this method

Returns:

  • (String)


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

def 
  @account_id
end

#call_idString

TODO: Write general description for this method

Returns:

  • (String)


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

def call_id
  @call_id
end

#channelsInteger

TODO: Write general description for this method

Returns:

  • (Integer)


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

def channels
  @channels
end

#conference_idString

TODO: Write general description for this method

Returns:

  • (String)


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

def conference_id
  @conference_id
end

#durationString

TODO: Write general description for this method

Returns:

  • (String)


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

def duration
  @duration
end

#end_timeString

TODO: Write general description for this method

Returns:

  • (String)


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

def end_time
  @end_time
end

#event_timeString

TODO: Write general description for this method

Returns:

  • (String)


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

def event_time
  @event_time
end

#event_typeString

TODO: Write general description for this method

Returns:

  • (String)


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

def event_type
  @event_type
end

#file_formatString

TODO: Write general description for this method

Returns:

  • (String)


71
72
73
# File 'lib/bandwidth/voice_lib/voice/models/conference_callback.rb', line 71

def file_format
  @file_format
end

#fromString

TODO: Write general description for this method

Returns:

  • (String)


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

def from
  @from
end

#media_urlString

TODO: Write general description for this method

Returns:

  • (String)


75
76
77
# File 'lib/bandwidth/voice_lib/voice/models/conference_callback.rb', line 75

def media_url
  @media_url
end

#nameString

TODO: Write general description for this method

Returns:

  • (String)


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

def name
  @name
end

#recording_idString

TODO: Write general description for this method

Returns:

  • (String)


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

def recording_id
  @recording_id
end

#start_timeString

TODO: Write general description for this method

Returns:

  • (String)


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

def start_time
  @start_time
end

#statusString

TODO: Write general description for this method

Returns:

  • (String)


79
80
81
# File 'lib/bandwidth/voice_lib/voice/models/conference_callback.rb', line 79

def status
  @status
end

#tagString

TODO: Write general description for this method

Returns:

  • (String)


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

def tag
  @tag
end

#toString

TODO: Write general description for this method

Returns:

  • (String)


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

def to
  @to
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



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
200
201
202
203
204
205
206
207
208
209
# File 'lib/bandwidth/voice_lib/voice/models/conference_callback.rb', line 169

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  conference_id = hash.key?('conferenceId') ? hash['conferenceId'] : SKIP
  name = hash.key?('name') ? hash['name'] : SKIP
  event_type = hash.key?('eventType') ? hash['eventType'] : SKIP
  event_time = hash.key?('eventTime') ? hash['eventTime'] : SKIP
  tag = hash.key?('tag') ? hash['tag'] : SKIP
  call_id = hash.key?('callId') ? hash['callId'] : SKIP
  to = hash.key?('to') ? hash['to'] : SKIP
  from = hash.key?('from') ? hash['from'] : SKIP
   = hash.key?('accountId') ? hash['accountId'] : SKIP
  recording_id = hash.key?('recordingId') ? hash['recordingId'] : SKIP
  channels = hash.key?('channels') ? hash['channels'] : SKIP
  start_time = hash.key?('startTime') ? hash['startTime'] : SKIP
  end_time = hash.key?('endTime') ? hash['endTime'] : SKIP
  duration = hash.key?('duration') ? hash['duration'] : SKIP
  file_format = hash.key?('fileFormat') ? hash['fileFormat'] : SKIP
  media_url = hash.key?('mediaUrl') ? hash['mediaUrl'] : SKIP
  status = hash.key?('status') ? hash['status'] : SKIP

  # Create object from extracted values.
  ConferenceCallback.new(conference_id,
                         name,
                         event_type,
                         event_time,
                         tag,
                         call_id,
                         to,
                         from,
                         ,
                         recording_id,
                         channels,
                         start_time,
                         end_time,
                         duration,
                         file_format,
                         media_url,
                         status)
end

.namesObject

A mapping from model property names to API property names.



82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# File 'lib/bandwidth/voice_lib/voice/models/conference_callback.rb', line 82

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['conference_id'] = 'conferenceId'
  @_hash['name'] = 'name'
  @_hash['event_type'] = 'eventType'
  @_hash['event_time'] = 'eventTime'
  @_hash['tag'] = 'tag'
  @_hash['call_id'] = 'callId'
  @_hash['to'] = 'to'
  @_hash['from'] = 'from'
  @_hash['account_id'] = 'accountId'
  @_hash['recording_id'] = 'recordingId'
  @_hash['channels'] = 'channels'
  @_hash['start_time'] = 'startTime'
  @_hash['end_time'] = 'endTime'
  @_hash['duration'] = 'duration'
  @_hash['file_format'] = 'fileFormat'
  @_hash['media_url'] = 'mediaUrl'
  @_hash['status'] = 'status'
  @_hash
end

Instance Method Details

#nullablesObject

An array for nullable fields



128
129
130
# File 'lib/bandwidth/voice_lib/voice/models/conference_callback.rb', line 128

def nullables
  []
end

#optionalsObject

An array for optional fields



105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# File 'lib/bandwidth/voice_lib/voice/models/conference_callback.rb', line 105

def optionals
  %w[
    conference_id
    name
    event_type
    event_time
    tag
    call_id
    to
    from
    account_id
    recording_id
    channels
    start_time
    end_time
    duration
    file_format
    media_url
    status
  ]
end