Class: Bandwidth::CreateCallRequest
- Defined in:
- lib/bandwidth/voice_lib/voice/models/create_call_request.rb
Overview
CreateCallRequest Model.
Instance Attribute Summary collapse
-
#answer_fallback_method ⇒ AnswerFallbackMethodEnum
A comma-separated list of ‘User-To-User’ headers to be sent in the INVITE when calling a SIP URI.
-
#answer_fallback_url ⇒ String
A comma-separated list of ‘User-To-User’ headers to be sent in the INVITE when calling a SIP URI.
-
#answer_method ⇒ AnswerMethodEnum
A comma-separated list of ‘User-To-User’ headers to be sent in the INVITE when calling a SIP URI.
-
#answer_url ⇒ String
A comma-separated list of ‘User-To-User’ headers to be sent in the INVITE when calling a SIP URI.
-
#application_id ⇒ String
A comma-separated list of ‘User-To-User’ headers to be sent in the INVITE when calling a SIP URI.
-
#call_timeout ⇒ Float
A comma-separated list of ‘User-To-User’ headers to be sent in the INVITE when calling a SIP URI.
-
#callback_timeout ⇒ Float
A comma-separated list of ‘User-To-User’ headers to be sent in the INVITE when calling a SIP URI.
-
#disconnect_method ⇒ DisconnectMethodEnum
A comma-separated list of ‘User-To-User’ headers to be sent in the INVITE when calling a SIP URI.
-
#disconnect_url ⇒ String
A comma-separated list of ‘User-To-User’ headers to be sent in the INVITE when calling a SIP URI.
-
#fallback_password ⇒ String
A comma-separated list of ‘User-To-User’ headers to be sent in the INVITE when calling a SIP URI.
-
#fallback_username ⇒ String
A comma-separated list of ‘User-To-User’ headers to be sent in the INVITE when calling a SIP URI.
-
#from ⇒ String
Format is E164.
-
#machine_detection ⇒ MachineDetectionRequest
A comma-separated list of ‘User-To-User’ headers to be sent in the INVITE when calling a SIP URI.
-
#password ⇒ String
A comma-separated list of ‘User-To-User’ headers to be sent in the INVITE when calling a SIP URI.
-
#tag ⇒ String
A comma-separated list of ‘User-To-User’ headers to be sent in the INVITE when calling a SIP URI.
-
#to ⇒ String
Format is E164 or SIP URI.
-
#username ⇒ String
A comma-separated list of ‘User-To-User’ headers to be sent in the INVITE when calling a SIP URI.
-
#uui ⇒ String
A comma-separated list of ‘User-To-User’ headers to be sent in the INVITE when calling a SIP URI.
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(from = nil, to = nil, answer_url = nil, application_id = nil, uui = nil, call_timeout = nil, callback_timeout = nil, answer_fallback_url = nil, username = nil, password = nil, fallback_username = nil, fallback_password = nil, answer_method = nil, answer_fallback_method = nil, disconnect_url = nil, disconnect_method = nil, tag = nil, machine_detection = nil) ⇒ CreateCallRequest
constructor
A new instance of CreateCallRequest.
-
#nullables ⇒ Object
An array for nullable fields.
-
#optionals ⇒ Object
An array for optional fields.
Methods inherited from BaseModel
Constructor Details
#initialize(from = nil, to = nil, answer_url = nil, application_id = nil, uui = nil, call_timeout = nil, callback_timeout = nil, answer_fallback_url = nil, username = nil, password = nil, fallback_username = nil, fallback_password = nil, answer_method = nil, answer_fallback_method = nil, disconnect_url = nil, disconnect_method = nil, tag = nil, machine_detection = nil) ⇒ CreateCallRequest
Returns a new instance of CreateCallRequest.
211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 |
# File 'lib/bandwidth/voice_lib/voice/models/create_call_request.rb', line 211 def initialize(from = nil, to = nil, answer_url = nil, application_id = nil, uui = nil, call_timeout = nil, callback_timeout = nil, answer_fallback_url = nil, username = nil, password = nil, fallback_username = nil, fallback_password = nil, answer_method = nil, answer_fallback_method = nil, disconnect_url = nil, disconnect_method = nil, tag = nil, machine_detection = nil) @from = from unless from == SKIP @to = to unless to == SKIP @uui = uui unless uui == SKIP @call_timeout = call_timeout unless call_timeout == SKIP @callback_timeout = callback_timeout unless callback_timeout == SKIP @answer_url = answer_url unless answer_url == SKIP @answer_fallback_url = answer_fallback_url unless answer_fallback_url == SKIP @username = username unless username == SKIP @password = password unless password == SKIP @fallback_username = fallback_username unless fallback_username == SKIP @fallback_password = fallback_password unless fallback_password == SKIP @answer_method = answer_method unless answer_method == SKIP @answer_fallback_method = answer_fallback_method unless answer_fallback_method == SKIP @disconnect_url = disconnect_url unless disconnect_url == SKIP @disconnect_method = disconnect_method unless disconnect_method == SKIP @tag = tag unless tag == SKIP @application_id = application_id unless application_id == SKIP @machine_detection = machine_detection unless machine_detection == SKIP end |
Instance Attribute Details
#answer_fallback_method ⇒ AnswerFallbackMethodEnum
A comma-separated list of ‘User-To-User’ headers to be sent in the INVITE when calling a SIP URI. Each value must end with an ‘encoding’ parameter as described in tools.ietf.org/html/rfc7433. Only ‘jwt’ and ‘base64’ encodings are allowed. The entire value cannot exceed 350 characters, including parameters and separators.
106 107 108 |
# File 'lib/bandwidth/voice_lib/voice/models/create_call_request.rb', line 106 def answer_fallback_method @answer_fallback_method end |
#answer_fallback_url ⇒ String
A comma-separated list of ‘User-To-User’ headers to be sent in the INVITE when calling a SIP URI. Each value must end with an ‘encoding’ parameter as described in tools.ietf.org/html/rfc7433. Only ‘jwt’ and ‘base64’ encodings are allowed. The entire value cannot exceed 350 characters, including parameters and separators.
58 59 60 |
# File 'lib/bandwidth/voice_lib/voice/models/create_call_request.rb', line 58 def answer_fallback_url @answer_fallback_url end |
#answer_method ⇒ AnswerMethodEnum
A comma-separated list of ‘User-To-User’ headers to be sent in the INVITE when calling a SIP URI. Each value must end with an ‘encoding’ parameter as described in tools.ietf.org/html/rfc7433. Only ‘jwt’ and ‘base64’ encodings are allowed. The entire value cannot exceed 350 characters, including parameters and separators.
98 99 100 |
# File 'lib/bandwidth/voice_lib/voice/models/create_call_request.rb', line 98 def answer_method @answer_method end |
#answer_url ⇒ String
A comma-separated list of ‘User-To-User’ headers to be sent in the INVITE when calling a SIP URI. Each value must end with an ‘encoding’ parameter as described in tools.ietf.org/html/rfc7433. Only ‘jwt’ and ‘base64’ encodings are allowed. The entire value cannot exceed 350 characters, including parameters and separators.
50 51 52 |
# File 'lib/bandwidth/voice_lib/voice/models/create_call_request.rb', line 50 def answer_url @answer_url end |
#application_id ⇒ String
A comma-separated list of ‘User-To-User’ headers to be sent in the INVITE when calling a SIP URI. Each value must end with an ‘encoding’ parameter as described in tools.ietf.org/html/rfc7433. Only ‘jwt’ and ‘base64’ encodings are allowed. The entire value cannot exceed 350 characters, including parameters and separators.
138 139 140 |
# File 'lib/bandwidth/voice_lib/voice/models/create_call_request.rb', line 138 def application_id @application_id end |
#call_timeout ⇒ Float
A comma-separated list of ‘User-To-User’ headers to be sent in the INVITE when calling a SIP URI. Each value must end with an ‘encoding’ parameter as described in tools.ietf.org/html/rfc7433. Only ‘jwt’ and ‘base64’ encodings are allowed. The entire value cannot exceed 350 characters, including parameters and separators.
34 35 36 |
# File 'lib/bandwidth/voice_lib/voice/models/create_call_request.rb', line 34 def call_timeout @call_timeout end |
#callback_timeout ⇒ Float
A comma-separated list of ‘User-To-User’ headers to be sent in the INVITE when calling a SIP URI. Each value must end with an ‘encoding’ parameter as described in tools.ietf.org/html/rfc7433. Only ‘jwt’ and ‘base64’ encodings are allowed. The entire value cannot exceed 350 characters, including parameters and separators.
42 43 44 |
# File 'lib/bandwidth/voice_lib/voice/models/create_call_request.rb', line 42 def callback_timeout @callback_timeout end |
#disconnect_method ⇒ DisconnectMethodEnum
A comma-separated list of ‘User-To-User’ headers to be sent in the INVITE when calling a SIP URI. Each value must end with an ‘encoding’ parameter as described in tools.ietf.org/html/rfc7433. Only ‘jwt’ and ‘base64’ encodings are allowed. The entire value cannot exceed 350 characters, including parameters and separators.
122 123 124 |
# File 'lib/bandwidth/voice_lib/voice/models/create_call_request.rb', line 122 def disconnect_method @disconnect_method end |
#disconnect_url ⇒ String
A comma-separated list of ‘User-To-User’ headers to be sent in the INVITE when calling a SIP URI. Each value must end with an ‘encoding’ parameter as described in tools.ietf.org/html/rfc7433. Only ‘jwt’ and ‘base64’ encodings are allowed. The entire value cannot exceed 350 characters, including parameters and separators.
114 115 116 |
# File 'lib/bandwidth/voice_lib/voice/models/create_call_request.rb', line 114 def disconnect_url @disconnect_url end |
#fallback_password ⇒ String
A comma-separated list of ‘User-To-User’ headers to be sent in the INVITE when calling a SIP URI. Each value must end with an ‘encoding’ parameter as described in tools.ietf.org/html/rfc7433. Only ‘jwt’ and ‘base64’ encodings are allowed. The entire value cannot exceed 350 characters, including parameters and separators.
90 91 92 |
# File 'lib/bandwidth/voice_lib/voice/models/create_call_request.rb', line 90 def fallback_password @fallback_password end |
#fallback_username ⇒ String
A comma-separated list of ‘User-To-User’ headers to be sent in the INVITE when calling a SIP URI. Each value must end with an ‘encoding’ parameter as described in tools.ietf.org/html/rfc7433. Only ‘jwt’ and ‘base64’ encodings are allowed. The entire value cannot exceed 350 characters, including parameters and separators.
82 83 84 |
# File 'lib/bandwidth/voice_lib/voice/models/create_call_request.rb', line 82 def fallback_username @fallback_username end |
#from ⇒ String
Format is E164
14 15 16 |
# File 'lib/bandwidth/voice_lib/voice/models/create_call_request.rb', line 14 def from @from end |
#machine_detection ⇒ MachineDetectionRequest
A comma-separated list of ‘User-To-User’ headers to be sent in the INVITE when calling a SIP URI. Each value must end with an ‘encoding’ parameter as described in tools.ietf.org/html/rfc7433. Only ‘jwt’ and ‘base64’ encodings are allowed. The entire value cannot exceed 350 characters, including parameters and separators.
146 147 148 |
# File 'lib/bandwidth/voice_lib/voice/models/create_call_request.rb', line 146 def machine_detection @machine_detection end |
#password ⇒ String
A comma-separated list of ‘User-To-User’ headers to be sent in the INVITE when calling a SIP URI. Each value must end with an ‘encoding’ parameter as described in tools.ietf.org/html/rfc7433. Only ‘jwt’ and ‘base64’ encodings are allowed. The entire value cannot exceed 350 characters, including parameters and separators.
74 75 76 |
# File 'lib/bandwidth/voice_lib/voice/models/create_call_request.rb', line 74 def password @password end |
#tag ⇒ String
A comma-separated list of ‘User-To-User’ headers to be sent in the INVITE when calling a SIP URI. Each value must end with an ‘encoding’ parameter as described in tools.ietf.org/html/rfc7433. Only ‘jwt’ and ‘base64’ encodings are allowed. The entire value cannot exceed 350 characters, including parameters and separators.
130 131 132 |
# File 'lib/bandwidth/voice_lib/voice/models/create_call_request.rb', line 130 def tag @tag end |
#to ⇒ String
Format is E164 or SIP URI
18 19 20 |
# File 'lib/bandwidth/voice_lib/voice/models/create_call_request.rb', line 18 def to @to end |
#username ⇒ String
A comma-separated list of ‘User-To-User’ headers to be sent in the INVITE when calling a SIP URI. Each value must end with an ‘encoding’ parameter as described in tools.ietf.org/html/rfc7433. Only ‘jwt’ and ‘base64’ encodings are allowed. The entire value cannot exceed 350 characters, including parameters and separators.
66 67 68 |
# File 'lib/bandwidth/voice_lib/voice/models/create_call_request.rb', line 66 def username @username end |
#uui ⇒ String
A comma-separated list of ‘User-To-User’ headers to be sent in the INVITE when calling a SIP URI. Each value must end with an ‘encoding’ parameter as described in tools.ietf.org/html/rfc7433. Only ‘jwt’ and ‘base64’ encodings are allowed. The entire value cannot exceed 350 characters, including parameters and separators.
26 27 28 |
# File 'lib/bandwidth/voice_lib/voice/models/create_call_request.rb', line 26 def uui @uui end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 |
# File 'lib/bandwidth/voice_lib/voice/models/create_call_request.rb', line 250 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. from = hash.key?('from') ? hash['from'] : SKIP to = hash.key?('to') ? hash['to'] : SKIP answer_url = hash.key?('answerUrl') ? hash['answerUrl'] : SKIP application_id = hash.key?('applicationId') ? hash['applicationId'] : SKIP uui = hash.key?('uui') ? hash['uui'] : SKIP call_timeout = hash.key?('callTimeout') ? hash['callTimeout'] : SKIP callback_timeout = hash.key?('callbackTimeout') ? hash['callbackTimeout'] : SKIP answer_fallback_url = hash.key?('answerFallbackUrl') ? hash['answerFallbackUrl'] : SKIP username = hash.key?('username') ? hash['username'] : SKIP password = hash.key?('password') ? hash['password'] : SKIP fallback_username = hash.key?('fallbackUsername') ? hash['fallbackUsername'] : SKIP fallback_password = hash.key?('fallbackPassword') ? hash['fallbackPassword'] : SKIP answer_method = hash.key?('answerMethod') ? hash['answerMethod'] : SKIP answer_fallback_method = hash.key?('answerFallbackMethod') ? hash['answerFallbackMethod'] : SKIP disconnect_url = hash.key?('disconnectUrl') ? hash['disconnectUrl'] : SKIP disconnect_method = hash.key?('disconnectMethod') ? hash['disconnectMethod'] : SKIP tag = hash.key?('tag') ? hash['tag'] : SKIP machine_detection = MachineDetectionConfiguration.from_hash(hash['machineDetection']) if hash['machineDetection'] # Create object from extracted values. CreateCallRequest.new(from, to, answer_url, application_id, uui, call_timeout, callback_timeout, answer_fallback_url, username, password, fallback_username, fallback_password, answer_method, answer_fallback_method, disconnect_url, disconnect_method, tag, machine_detection) end |
.names ⇒ Object
A mapping from model property names to API property names.
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 |
# File 'lib/bandwidth/voice_lib/voice/models/create_call_request.rb', line 149 def self.names @_hash = {} if @_hash.nil? @_hash['from'] = 'from' @_hash['to'] = 'to' @_hash['uui'] = 'uui' @_hash['call_timeout'] = 'callTimeout' @_hash['callback_timeout'] = 'callbackTimeout' @_hash['answer_url'] = 'answerUrl' @_hash['answer_fallback_url'] = 'answerFallbackUrl' @_hash['username'] = 'username' @_hash['password'] = 'password' @_hash['fallback_username'] = 'fallbackUsername' @_hash['fallback_password'] = 'fallbackPassword' @_hash['answer_method'] = 'answerMethod' @_hash['answer_fallback_method'] = 'answerFallbackMethod' @_hash['disconnect_url'] = 'disconnectUrl' @_hash['disconnect_method'] = 'disconnectMethod' @_hash['tag'] = 'tag' @_hash['application_id'] = 'applicationId' @_hash['machine_detection'] = 'machineDetection' @_hash end |
Instance Method Details
#nullables ⇒ Object
An array for nullable fields
193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 |
# File 'lib/bandwidth/voice_lib/voice/models/create_call_request.rb', line 193 def nullables %w[ uui call_timeout callback_timeout answer_fallback_url username password fallback_username fallback_password answer_method answer_fallback_method disconnect_url disconnect_method tag ] end |
#optionals ⇒ Object
An array for optional fields
173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 |
# File 'lib/bandwidth/voice_lib/voice/models/create_call_request.rb', line 173 def optionals %w[ uui call_timeout callback_timeout answer_fallback_url username password fallback_username fallback_password answer_method answer_fallback_method disconnect_url disconnect_method tag machine_detection ] end |