Class: Bandwidth::ApiCallResponse
- Defined in:
- lib/bandwidth/voice_lib/voice/models/api_call_response.rb
Overview
ApiCallResponse Model.
Instance Attribute Summary collapse
-
#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.
-
#disconnect_method ⇒ DisconnectMethodEnum
TODO: Write general description for this method.
-
#disconnect_url ⇒ 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(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, disconnect_url = nil, username = nil, password = nil, tag = nil) ⇒ ApiCallResponse
constructor
A new instance of ApiCallResponse.
Methods inherited from BaseModel
Constructor Details
#initialize(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, disconnect_url = nil, username = nil, password = nil, tag = nil) ⇒ ApiCallResponse
Returns a new instance of ApiCallResponse.
86 87 88 89 90 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 86 def initialize(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, disconnect_url = nil, username = nil, password = nil, tag = nil) @call_id = call_id @application_id = application_id @to = to @from = from @start_time = start_time @call_url = call_url @call_timeout = call_timeout @answer_url = answer_url @answer_method = answer_method @disconnect_url = disconnect_url @disconnect_method = disconnect_method @username = username @password = password @tag = tag end |
Instance Attribute Details
#answer_method ⇒ AnswerMethodEnum
TODO: Write general description for this method
44 45 46 |
# File 'lib/bandwidth/voice_lib/voice/models/api_call_response.rb', line 44 def answer_method @answer_method end |
#answer_url ⇒ String
TODO: Write general description for this method
40 41 42 |
# File 'lib/bandwidth/voice_lib/voice/models/api_call_response.rb', line 40 def answer_url @answer_url end |
#application_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 application_id @application_id end |
#call_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 call_id @call_id end |
#call_timeout ⇒ Float
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_timeout @call_timeout end |
#call_url ⇒ String
TODO: Write general description for this method
32 33 34 |
# File 'lib/bandwidth/voice_lib/voice/models/api_call_response.rb', line 32 def call_url @call_url end |
#disconnect_method ⇒ DisconnectMethodEnum
TODO: Write general description for this method
52 53 54 |
# File 'lib/bandwidth/voice_lib/voice/models/api_call_response.rb', line 52 def disconnect_method @disconnect_method end |
#disconnect_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 disconnect_url @disconnect_url end |
#from ⇒ 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 from @from end |
#password ⇒ String
TODO: Write general description for this method
60 61 62 |
# File 'lib/bandwidth/voice_lib/voice/models/api_call_response.rb', line 60 def password @password end |
#start_time ⇒ DateTime
TODO: Write general description for this method
28 29 30 |
# File 'lib/bandwidth/voice_lib/voice/models/api_call_response.rb', line 28 def start_time @start_time end |
#tag ⇒ 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 tag @tag end |
#to ⇒ 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 to @to end |
#username ⇒ 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 username @username end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 |
# File 'lib/bandwidth/voice_lib/voice/models/api_call_response.rb', line 117 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. 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'] disconnect_url = hash['disconnectUrl'] username = hash['username'] password = hash['password'] tag = hash['tag'] # Create object from extracted values. ApiCallResponse.new(call_id, application_id, to, from, call_url, answer_url, answer_method, disconnect_method, start_time, call_timeout, disconnect_url, username, password, tag) end |
.names ⇒ Object
A mapping from model property names to API property names.
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/bandwidth/voice_lib/voice/models/api_call_response.rb', line 67 def self.names @_hash = {} if @_hash.nil? @_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['answer_url'] = 'answerUrl' @_hash['answer_method'] = 'answerMethod' @_hash['disconnect_url'] = 'disconnectUrl' @_hash['disconnect_method'] = 'disconnectMethod' @_hash['username'] = 'username' @_hash['password'] = 'password' @_hash['tag'] = 'tag' @_hash end |