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
Format is E164.
-
#answer_fallback_url ⇒ String
Format is E164.
-
#answer_method ⇒ AnswerMethodEnum
Format is E164.
-
#answer_url ⇒ String
Format is E164.
-
#application_id ⇒ String
Format is E164.
-
#call_timeout ⇒ Float
Format is E164.
-
#callback_timeout ⇒ Float
Format is E164.
-
#disconnect_method ⇒ DisconnectMethodEnum
Format is E164.
-
#disconnect_url ⇒ String
Format is E164.
-
#fallback_password ⇒ String
Format is E164.
-
#fallback_username ⇒ String
Format is E164.
-
#from ⇒ String
Format is E164.
-
#obfuscated_from ⇒ String
Format is E164.
-
#obfuscated_to ⇒ String
Format is E164.
-
#password ⇒ String
Format is E164.
-
#tag ⇒ String
Format is E164.
-
#to ⇒ String
Format is E164.
-
#username ⇒ String
Format is E164.
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, 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, 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.
105 106 107 108 109 110 111 112 113 114 115 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 |
# File 'lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb', line 105 def initialize(from = nil, to = nil, answer_url = nil, application_id = 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 @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
Format is E164
55 56 57 |
# File 'lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb', line 55 def answer_fallback_method @answer_fallback_method end |
#answer_fallback_url ⇒ String
Format is E164
31 32 33 |
# File 'lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb', line 31 def answer_fallback_url @answer_fallback_url end |
#answer_method ⇒ AnswerMethodEnum
Format is E164
51 52 53 |
# File 'lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb', line 51 def answer_method @answer_method end |
#answer_url ⇒ String
Format is E164
27 28 29 |
# File 'lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb', line 27 def answer_url @answer_url end |
#application_id ⇒ String
Format is E164
71 72 73 |
# File 'lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb', line 71 def application_id @application_id end |
#call_timeout ⇒ Float
Format is E164
19 20 21 |
# File 'lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb', line 19 def call_timeout @call_timeout end |
#callback_timeout ⇒ Float
Format is E164
23 24 25 |
# File 'lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb', line 23 def callback_timeout @callback_timeout end |
#disconnect_method ⇒ DisconnectMethodEnum
Format is E164
63 64 65 |
# File 'lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb', line 63 def disconnect_method @disconnect_method end |
#disconnect_url ⇒ String
Format is E164
59 60 61 |
# File 'lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb', line 59 def disconnect_url @disconnect_url end |
#fallback_password ⇒ String
Format is E164
47 48 49 |
# File 'lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb', line 47 def fallback_password @fallback_password end |
#fallback_username ⇒ String
Format is E164
43 44 45 |
# File 'lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb', line 43 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
Format is E164
79 80 81 |
# File 'lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb', line 79 def @obfuscated_from end |
#obfuscated_to ⇒ String
Format is E164
75 76 77 |
# File 'lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb', line 75 def @obfuscated_to end |
#password ⇒ String
Format is E164
39 40 41 |
# File 'lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb', line 39 def password @password end |
#tag ⇒ String
Format is E164
67 68 69 |
# File 'lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb', line 67 def tag @tag end |
#to ⇒ String
Format is E164
15 16 17 |
# File 'lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb', line 15 def to @to end |
#username ⇒ String
Format is E164
35 36 37 |
# File 'lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb', line 35 def username @username end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 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 |
# File 'lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb', line 144 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'] 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, 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.
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/bandwidth/voice_lib/voice/models/api_create_call_request.rb', line 82 def self.names @_hash = {} if @_hash.nil? @_hash['from'] = 'from' @_hash['to'] = 'to' @_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 |