Class: Bandwidth::ApiCreateCallRequest
- Defined in:
- lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb
Overview
ApiCreateCallRequest Model.
Instance Attribute Summary collapse
-
#answer_fallback_method ⇒ AnswerFallbackMethodEnum
When calling a SIP URI, this will be sent as the ‘User-To-User’ header within the initial INVITE.
-
#answer_fallback_url ⇒ String
When calling a SIP URI, this will be sent as the ‘User-To-User’ header within the initial INVITE.
-
#answer_method ⇒ AnswerMethodEnum
When calling a SIP URI, this will be sent as the ‘User-To-User’ header within the initial INVITE.
-
#answer_url ⇒ String
When calling a SIP URI, this will be sent as the ‘User-To-User’ header within the initial INVITE.
-
#application_id ⇒ String
When calling a SIP URI, this will be sent as the ‘User-To-User’ header within the initial INVITE.
-
#call_timeout ⇒ Float
When calling a SIP URI, this will be sent as the ‘User-To-User’ header within the initial INVITE.
-
#callback_timeout ⇒ Float
When calling a SIP URI, this will be sent as the ‘User-To-User’ header within the initial INVITE.
-
#disconnect_method ⇒ DisconnectMethodEnum
When calling a SIP URI, this will be sent as the ‘User-To-User’ header within the initial INVITE.
-
#disconnect_url ⇒ String
When calling a SIP URI, this will be sent as the ‘User-To-User’ header within the initial INVITE.
-
#fallback_password ⇒ String
When calling a SIP URI, this will be sent as the ‘User-To-User’ header within the initial INVITE.
-
#fallback_username ⇒ String
When calling a SIP URI, this will be sent as the ‘User-To-User’ header within the initial INVITE.
-
#from ⇒ String
Format is E164.
-
#obfuscated_from ⇒ String
When calling a SIP URI, this will be sent as the ‘User-To-User’ header within the initial INVITE.
-
#obfuscated_to ⇒ String
When calling a SIP URI, this will be sent as the ‘User-To-User’ header within the initial INVITE.
-
#password ⇒ String
When calling a SIP URI, this will be sent as the ‘User-To-User’ header within the initial INVITE.
-
#tag ⇒ String
When calling a SIP URI, this will be sent as the ‘User-To-User’ header within the initial INVITE.
-
#to ⇒ String
Format is E164 or SIP URI.
-
#username ⇒ String
When calling a SIP URI, this will be sent as the ‘User-To-User’ header within the initial INVITE.
-
#uui ⇒ String
When calling a SIP URI, this will be sent as the ‘User-To-User’ header within the initial INVITE.
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, obfuscated_to = nil, obfuscated_from = nil) ⇒ ApiCreateCallRequest
constructor
A new instance of ApiCreateCallRequest.
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, obfuscated_to = nil, obfuscated_from = nil) ⇒ ApiCreateCallRequest
Returns a new instance of ApiCreateCallRequest.
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/api_create_call_request.rb', line 161 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, = nil, = nil) @from = from @to = to @uui = uui @call_timeout = call_timeout @callback_timeout = callback_timeout @answer_url = answer_url @answer_fallback_url = answer_fallback_url @username = username @password = password @fallback_username = fallback_username @fallback_password = fallback_password @answer_method = answer_method @answer_fallback_method = answer_fallback_method @disconnect_url = disconnect_url @disconnect_method = disconnect_method @tag = tag @application_id = application_id @obfuscated_to = @obfuscated_from = end |
Instance Attribute Details
#answer_fallback_method ⇒ AnswerFallbackMethodEnum
When calling a SIP URI, this will be sent as the ‘User-To-User’ header within the initial INVITE. An ‘encoding’ parameter must be specified as described in tools.ietf.org/html/rfc7433. This header cannot exceed 256 characters, including the encoding parameter.
92 93 94 |
# File 'lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb', line 92 def answer_fallback_method @answer_fallback_method end |
#answer_fallback_url ⇒ String
When calling a SIP URI, this will be sent as the ‘User-To-User’ header within the initial INVITE. An ‘encoding’ parameter must be specified as described in tools.ietf.org/html/rfc7433. This header cannot exceed 256 characters, including the encoding parameter.
50 51 52 |
# File 'lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb', line 50 def answer_fallback_url @answer_fallback_url end |
#answer_method ⇒ AnswerMethodEnum
When calling a SIP URI, this will be sent as the ‘User-To-User’ header within the initial INVITE. An ‘encoding’ parameter must be specified as described in tools.ietf.org/html/rfc7433. This header cannot exceed 256 characters, including the encoding parameter.
85 86 87 |
# File 'lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb', line 85 def answer_method @answer_method end |
#answer_url ⇒ String
When calling a SIP URI, this will be sent as the ‘User-To-User’ header within the initial INVITE. An ‘encoding’ parameter must be specified as described in tools.ietf.org/html/rfc7433. This header cannot exceed 256 characters, including the encoding parameter.
43 44 45 |
# File 'lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb', line 43 def answer_url @answer_url end |
#application_id ⇒ String
When calling a SIP URI, this will be sent as the ‘User-To-User’ header within the initial INVITE. An ‘encoding’ parameter must be specified as described in tools.ietf.org/html/rfc7433. This header cannot exceed 256 characters, including the encoding parameter.
120 121 122 |
# File 'lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb', line 120 def application_id @application_id end |
#call_timeout ⇒ Float
When calling a SIP URI, this will be sent as the ‘User-To-User’ header within the initial INVITE. An ‘encoding’ parameter must be specified as described in tools.ietf.org/html/rfc7433. This header cannot exceed 256 characters, including the encoding parameter.
29 30 31 |
# File 'lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb', line 29 def call_timeout @call_timeout end |
#callback_timeout ⇒ Float
When calling a SIP URI, this will be sent as the ‘User-To-User’ header within the initial INVITE. An ‘encoding’ parameter must be specified as described in tools.ietf.org/html/rfc7433. This header cannot exceed 256 characters, including the encoding parameter.
36 37 38 |
# File 'lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb', line 36 def callback_timeout @callback_timeout end |
#disconnect_method ⇒ DisconnectMethodEnum
When calling a SIP URI, this will be sent as the ‘User-To-User’ header within the initial INVITE. An ‘encoding’ parameter must be specified as described in tools.ietf.org/html/rfc7433. This header cannot exceed 256 characters, including the encoding parameter.
106 107 108 |
# File 'lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb', line 106 def disconnect_method @disconnect_method end |
#disconnect_url ⇒ String
When calling a SIP URI, this will be sent as the ‘User-To-User’ header within the initial INVITE. An ‘encoding’ parameter must be specified as described in tools.ietf.org/html/rfc7433. This header cannot exceed 256 characters, including the encoding parameter.
99 100 101 |
# File 'lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb', line 99 def disconnect_url @disconnect_url end |
#fallback_password ⇒ String
When calling a SIP URI, this will be sent as the ‘User-To-User’ header within the initial INVITE. An ‘encoding’ parameter must be specified as described in tools.ietf.org/html/rfc7433. This header cannot exceed 256 characters, including the encoding parameter.
78 79 80 |
# File 'lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb', line 78 def fallback_password @fallback_password end |
#fallback_username ⇒ String
When calling a SIP URI, this will be sent as the ‘User-To-User’ header within the initial INVITE. An ‘encoding’ parameter must be specified as described in tools.ietf.org/html/rfc7433. This header cannot exceed 256 characters, including the encoding parameter.
71 72 73 |
# File 'lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb', line 71 def fallback_username @fallback_username end |
#from ⇒ String
Format is E164
11 12 13 |
# File 'lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb', line 11 def from @from end |
#obfuscated_from ⇒ String
When calling a SIP URI, this will be sent as the ‘User-To-User’ header within the initial INVITE. An ‘encoding’ parameter must be specified as described in tools.ietf.org/html/rfc7433. This header cannot exceed 256 characters, including the encoding parameter.
134 135 136 |
# File 'lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb', line 134 def @obfuscated_from end |
#obfuscated_to ⇒ String
When calling a SIP URI, this will be sent as the ‘User-To-User’ header within the initial INVITE. An ‘encoding’ parameter must be specified as described in tools.ietf.org/html/rfc7433. This header cannot exceed 256 characters, including the encoding parameter.
127 128 129 |
# File 'lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb', line 127 def @obfuscated_to end |
#password ⇒ String
When calling a SIP URI, this will be sent as the ‘User-To-User’ header within the initial INVITE. An ‘encoding’ parameter must be specified as described in tools.ietf.org/html/rfc7433. This header cannot exceed 256 characters, including the encoding parameter.
64 65 66 |
# File 'lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb', line 64 def password @password end |
#tag ⇒ String
When calling a SIP URI, this will be sent as the ‘User-To-User’ header within the initial INVITE. An ‘encoding’ parameter must be specified as described in tools.ietf.org/html/rfc7433. This header cannot exceed 256 characters, including the encoding parameter.
113 114 115 |
# File 'lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb', line 113 def tag @tag end |
#to ⇒ String
Format is E164 or SIP URI
15 16 17 |
# File 'lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb', line 15 def to @to end |
#username ⇒ String
When calling a SIP URI, this will be sent as the ‘User-To-User’ header within the initial INVITE. An ‘encoding’ parameter must be specified as described in tools.ietf.org/html/rfc7433. This header cannot exceed 256 characters, including the encoding parameter.
57 58 59 |
# File 'lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb', line 57 def username @username end |
#uui ⇒ String
When calling a SIP URI, this will be sent as the ‘User-To-User’ header within the initial INVITE. An ‘encoding’ parameter must be specified as described in tools.ietf.org/html/rfc7433. This header cannot exceed 256 characters, including the encoding parameter.
22 23 24 |
# File 'lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb', line 22 def uui @uui end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
202 203 204 205 206 207 208 209 210 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 |
# File 'lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb', line 202 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. from = hash['from'] to = hash['to'] answer_url = hash['answerUrl'] application_id = hash['applicationId'] uui = hash['uui'] call_timeout = hash['callTimeout'] callback_timeout = hash['callbackTimeout'] answer_fallback_url = hash['answerFallbackUrl'] username = hash['username'] password = hash['password'] fallback_username = hash['fallbackUsername'] fallback_password = hash['fallbackPassword'] answer_method = hash['answerMethod'] answer_fallback_method = hash['answerFallbackMethod'] disconnect_url = hash['disconnectUrl'] disconnect_method = hash['disconnectMethod'] tag = hash['tag'] = hash['obfuscatedTo'] = hash['obfuscatedFrom'] # Create object from extracted values. ApiCreateCallRequest.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, , ) end |
.names ⇒ Object
A mapping from model property names to API property names.
137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 |
# File 'lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb', line 137 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['obfuscated_to'] = 'obfuscatedTo' @_hash['obfuscated_from'] = 'obfuscatedFrom' @_hash end |