Class: Bandwidth::ApiCallResponse
- Defined in:
- lib/bandwidth/voice_lib/voice/models/api_call_response.rb
Overview
ApiCallResponse Model.
Instance Attribute Summary collapse
-
#account_id ⇒ String
TODO: Write general description for this method.
-
#answer_fallback_method ⇒ AnswerFallbackMethodEnum
TODO: Write general description for this method.
-
#answer_fallback_url ⇒ String
TODO: Write general description for this method.
-
#answer_method ⇒ AnswerMethodEnum
TODO: Write general description for this method.
-
#answer_url ⇒ String
TODO: Write general description for this method.
-
#application_id ⇒ String
TODO: Write general description for this method.
-
#call_id ⇒ String
TODO: Write general description for this method.
-
#call_timeout ⇒ Float
TODO: Write general description for this method.
-
#call_url ⇒ String
TODO: Write general description for this method.
-
#callback_timeout ⇒ Float
TODO: Write general description for this method.
-
#disconnect_method ⇒ DisconnectMethodEnum
TODO: Write general description for this method.
-
#disconnect_url ⇒ String
TODO: Write general description for this method.
-
#fallback_password ⇒ String
TODO: Write general description for this method.
-
#fallback_username ⇒ String
TODO: Write general description for this method.
-
#from ⇒ String
TODO: Write general description for this method.
-
#password ⇒ String
TODO: Write general description for this method.
-
#start_time ⇒ DateTime
TODO: Write general description for this method.
-
#tag ⇒ String
TODO: Write general description for this method.
-
#to ⇒ String
TODO: Write general description for this method.
-
#username ⇒ String
TODO: Write general description for this method.
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(account_id = nil, call_id = nil, application_id = nil, to = nil, from = nil, call_url = nil, answer_url = nil, answer_method = nil, disconnect_method = nil, start_time = nil, call_timeout = nil, callback_timeout = nil, answer_fallback_url = nil, answer_fallback_method = nil, disconnect_url = nil, username = nil, password = nil, fallback_username = nil, fallback_password = nil, tag = nil) ⇒ ApiCallResponse
constructor
A new instance of ApiCallResponse.
Methods inherited from BaseModel
Constructor Details
#initialize(account_id = nil, call_id = nil, application_id = nil, to = nil, from = nil, call_url = nil, answer_url = nil, answer_method = nil, disconnect_method = nil, start_time = nil, call_timeout = nil, callback_timeout = nil, answer_fallback_url = nil, answer_fallback_method = nil, disconnect_url = nil, username = nil, password = nil, fallback_username = nil, fallback_password = nil, tag = nil) ⇒ ApiCallResponse
Returns a new instance of ApiCallResponse.
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 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 |
# File 'lib/bandwidth/voice_lib/voice/models/api_call_response.rb', line 116 def initialize(account_id = nil, call_id = nil, application_id = nil, to = nil, from = nil, call_url = nil, answer_url = nil, answer_method = nil, disconnect_method = nil, start_time = nil, call_timeout = nil, callback_timeout = nil, answer_fallback_url = nil, answer_fallback_method = nil, disconnect_url = nil, username = nil, password = nil, fallback_username = nil, fallback_password = nil, tag = nil) @account_id = account_id @call_id = call_id @application_id = application_id @to = to @from = from @start_time = start_time @call_url = call_url @call_timeout = call_timeout @callback_timeout = callback_timeout @answer_url = answer_url @answer_method = answer_method @answer_fallback_url = answer_fallback_url @answer_fallback_method = answer_fallback_method @disconnect_url = disconnect_url @disconnect_method = disconnect_method @username = username @password = password @fallback_username = fallback_username @fallback_password = fallback_password @tag = tag end |
Instance Attribute Details
#account_id ⇒ String
TODO: Write general description for this method
12 13 14 |
# File 'lib/bandwidth/voice_lib/voice/models/api_call_response.rb', line 12 def account_id @account_id end |
#answer_fallback_method ⇒ AnswerFallbackMethodEnum
TODO: Write general description for this method
60 61 62 |
# File 'lib/bandwidth/voice_lib/voice/models/api_call_response.rb', line 60 def answer_fallback_method @answer_fallback_method end |
#answer_fallback_url ⇒ String
TODO: Write general description for this method
56 57 58 |
# File 'lib/bandwidth/voice_lib/voice/models/api_call_response.rb', line 56 def answer_fallback_url @answer_fallback_url end |
#answer_method ⇒ AnswerMethodEnum
TODO: Write general description for this method
52 53 54 |
# File 'lib/bandwidth/voice_lib/voice/models/api_call_response.rb', line 52 def answer_method @answer_method end |
#answer_url ⇒ String
TODO: Write general description for this method
48 49 50 |
# File 'lib/bandwidth/voice_lib/voice/models/api_call_response.rb', line 48 def answer_url @answer_url end |
#application_id ⇒ String
TODO: Write general description for this method
20 21 22 |
# File 'lib/bandwidth/voice_lib/voice/models/api_call_response.rb', line 20 def application_id @application_id end |
#call_id ⇒ String
TODO: Write general description for this method
16 17 18 |
# File 'lib/bandwidth/voice_lib/voice/models/api_call_response.rb', line 16 def call_id @call_id end |
#call_timeout ⇒ Float
TODO: Write general description for this method
40 41 42 |
# File 'lib/bandwidth/voice_lib/voice/models/api_call_response.rb', line 40 def call_timeout @call_timeout end |
#call_url ⇒ String
TODO: Write general description for this method
36 37 38 |
# File 'lib/bandwidth/voice_lib/voice/models/api_call_response.rb', line 36 def call_url @call_url end |
#callback_timeout ⇒ Float
TODO: Write general description for this method
44 45 46 |
# File 'lib/bandwidth/voice_lib/voice/models/api_call_response.rb', line 44 def callback_timeout @callback_timeout end |
#disconnect_method ⇒ DisconnectMethodEnum
TODO: Write general description for this method
68 69 70 |
# File 'lib/bandwidth/voice_lib/voice/models/api_call_response.rb', line 68 def disconnect_method @disconnect_method end |
#disconnect_url ⇒ String
TODO: Write general description for this method
64 65 66 |
# File 'lib/bandwidth/voice_lib/voice/models/api_call_response.rb', line 64 def disconnect_url @disconnect_url end |
#fallback_password ⇒ String
TODO: Write general description for this method
84 85 86 |
# File 'lib/bandwidth/voice_lib/voice/models/api_call_response.rb', line 84 def fallback_password @fallback_password end |
#fallback_username ⇒ String
TODO: Write general description for this method
80 81 82 |
# File 'lib/bandwidth/voice_lib/voice/models/api_call_response.rb', line 80 def fallback_username @fallback_username end |
#from ⇒ String
TODO: Write general description for this method
28 29 30 |
# File 'lib/bandwidth/voice_lib/voice/models/api_call_response.rb', line 28 def from @from end |
#password ⇒ String
TODO: Write general description for this method
76 77 78 |
# File 'lib/bandwidth/voice_lib/voice/models/api_call_response.rb', line 76 def password @password end |
#start_time ⇒ DateTime
TODO: Write general description for this method
32 33 34 |
# File 'lib/bandwidth/voice_lib/voice/models/api_call_response.rb', line 32 def start_time @start_time end |
#tag ⇒ String
TODO: Write general description for this method
88 89 90 |
# File 'lib/bandwidth/voice_lib/voice/models/api_call_response.rb', line 88 def tag @tag end |
#to ⇒ String
TODO: Write general description for this method
24 25 26 |
# File 'lib/bandwidth/voice_lib/voice/models/api_call_response.rb', line 24 def to @to end |
#username ⇒ String
TODO: Write general description for this method
72 73 74 |
# File 'lib/bandwidth/voice_lib/voice/models/api_call_response.rb', line 72 def username @username end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 |
# File 'lib/bandwidth/voice_lib/voice/models/api_call_response.rb', line 159 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. account_id = hash['accountId'] call_id = hash['callId'] application_id = hash['applicationId'] to = hash['to'] from = hash['from'] call_url = hash['callUrl'] answer_url = hash['answerUrl'] answer_method = hash['answerMethod'] disconnect_method = hash['disconnectMethod'] start_time = APIHelper.rfc3339(hash['startTime']) if hash['startTime'] call_timeout = hash['callTimeout'] callback_timeout = hash['callbackTimeout'] answer_fallback_url = hash['answerFallbackUrl'] answer_fallback_method = hash['answerFallbackMethod'] disconnect_url = hash['disconnectUrl'] username = hash['username'] password = hash['password'] fallback_username = hash['fallbackUsername'] fallback_password = hash['fallbackPassword'] tag = hash['tag'] # Create object from extracted values. ApiCallResponse.new(account_id, call_id, application_id, to, from, call_url, answer_url, answer_method, disconnect_method, start_time, call_timeout, callback_timeout, answer_fallback_url, answer_fallback_method, disconnect_url, username, password, fallback_username, fallback_password, tag) end |
.names ⇒ Object
A mapping from model property names to API property names.
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/bandwidth/voice_lib/voice/models/api_call_response.rb', line 91 def self.names @_hash = {} if @_hash.nil? @_hash['account_id'] = 'accountId' @_hash['call_id'] = 'callId' @_hash['application_id'] = 'applicationId' @_hash['to'] = 'to' @_hash['from'] = 'from' @_hash['start_time'] = 'startTime' @_hash['call_url'] = 'callUrl' @_hash['call_timeout'] = 'callTimeout' @_hash['callback_timeout'] = 'callbackTimeout' @_hash['answer_url'] = 'answerUrl' @_hash['answer_method'] = 'answerMethod' @_hash['answer_fallback_url'] = 'answerFallbackUrl' @_hash['answer_fallback_method'] = 'answerFallbackMethod' @_hash['disconnect_url'] = 'disconnectUrl' @_hash['disconnect_method'] = 'disconnectMethod' @_hash['username'] = 'username' @_hash['password'] = 'password' @_hash['fallback_username'] = 'fallbackUsername' @_hash['fallback_password'] = 'fallbackPassword' @_hash['tag'] = 'tag' @_hash end |