Class: Bandwidth::ApiCallStateResponse
- Defined in:
- lib/bandwidth/voice_lib/voice/models/api_call_state_response.rb
Overview
ApiCallStateResponse Model.
Instance Attribute Summary collapse
-
#account_id ⇒ String
TODO: Write general description for this method.
-
#answer_time ⇒ DateTime
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.
-
#direction ⇒ String
TODO: Write general description for this method.
-
#disconnect_cause ⇒ DisconnectCauseEnum
TODO: Write general description for this method.
-
#end_time ⇒ DateTime
TODO: Write general description for this method.
-
#error_id ⇒ String
TODO: Write general description for this method.
-
#error_message ⇒ String
TODO: Write general description for this method.
-
#from ⇒ String
TODO: Write general description for this method.
-
#last_update ⇒ DateTime
TODO: Write general description for this method.
-
#parent_call_id ⇒ String
TODO: Write general description for this method.
-
#start_time ⇒ DateTime
TODO: Write general description for this method.
-
#state ⇒ StateEnum
TODO: Write general description for this method.
-
#to ⇒ 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, parent_call_id = nil, application_id = nil, account_id = nil, to = nil, from = nil, direction = nil, state = nil, start_time = nil, answer_time = nil, end_time = nil, disconnect_cause = nil, error_message = nil, error_id = nil, last_update = nil) ⇒ ApiCallStateResponse
constructor
A new instance of ApiCallStateResponse.
Methods inherited from BaseModel
Constructor Details
#initialize(call_id = nil, parent_call_id = nil, application_id = nil, account_id = nil, to = nil, from = nil, direction = nil, state = nil, start_time = nil, answer_time = nil, end_time = nil, disconnect_cause = nil, error_message = nil, error_id = nil, last_update = nil) ⇒ ApiCallStateResponse
Returns a new instance of ApiCallStateResponse.
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/bandwidth/voice_lib/voice/models/api_call_state_response.rb', line 91 def initialize(call_id = nil, parent_call_id = nil, application_id = nil, account_id = nil, to = nil, from = nil, direction = nil, state = nil, start_time = nil, answer_time = nil, end_time = nil, disconnect_cause = nil, = nil, error_id = nil, last_update = nil) @call_id = call_id @parent_call_id = parent_call_id @application_id = application_id @account_id = account_id @to = to @from = from @direction = direction @state = state @start_time = start_time @answer_time = answer_time @end_time = end_time @disconnect_cause = disconnect_cause @error_message = @error_id = error_id @last_update = last_update end |
Instance Attribute Details
#account_id ⇒ String
TODO: Write general description for this method
24 25 26 |
# File 'lib/bandwidth/voice_lib/voice/models/api_call_state_response.rb', line 24 def account_id @account_id end |
#answer_time ⇒ DateTime
TODO: Write general description for this method
48 49 50 |
# File 'lib/bandwidth/voice_lib/voice/models/api_call_state_response.rb', line 48 def answer_time @answer_time end |
#application_id ⇒ String
TODO: Write general description for this method
20 21 22 |
# File 'lib/bandwidth/voice_lib/voice/models/api_call_state_response.rb', line 20 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_state_response.rb', line 12 def call_id @call_id end |
#direction ⇒ String
TODO: Write general description for this method
36 37 38 |
# File 'lib/bandwidth/voice_lib/voice/models/api_call_state_response.rb', line 36 def direction @direction end |
#disconnect_cause ⇒ DisconnectCauseEnum
TODO: Write general description for this method
56 57 58 |
# File 'lib/bandwidth/voice_lib/voice/models/api_call_state_response.rb', line 56 def disconnect_cause @disconnect_cause end |
#end_time ⇒ DateTime
TODO: Write general description for this method
52 53 54 |
# File 'lib/bandwidth/voice_lib/voice/models/api_call_state_response.rb', line 52 def end_time @end_time end |
#error_id ⇒ String
TODO: Write general description for this method
64 65 66 |
# File 'lib/bandwidth/voice_lib/voice/models/api_call_state_response.rb', line 64 def error_id @error_id end |
#error_message ⇒ String
TODO: Write general description for this method
60 61 62 |
# File 'lib/bandwidth/voice_lib/voice/models/api_call_state_response.rb', line 60 def @error_message end |
#from ⇒ String
TODO: Write general description for this method
32 33 34 |
# File 'lib/bandwidth/voice_lib/voice/models/api_call_state_response.rb', line 32 def from @from end |
#last_update ⇒ DateTime
TODO: Write general description for this method
68 69 70 |
# File 'lib/bandwidth/voice_lib/voice/models/api_call_state_response.rb', line 68 def last_update @last_update end |
#parent_call_id ⇒ String
TODO: Write general description for this method
16 17 18 |
# File 'lib/bandwidth/voice_lib/voice/models/api_call_state_response.rb', line 16 def parent_call_id @parent_call_id end |
#start_time ⇒ DateTime
TODO: Write general description for this method
44 45 46 |
# File 'lib/bandwidth/voice_lib/voice/models/api_call_state_response.rb', line 44 def start_time @start_time end |
#state ⇒ StateEnum
TODO: Write general description for this method
40 41 42 |
# File 'lib/bandwidth/voice_lib/voice/models/api_call_state_response.rb', line 40 def state @state end |
#to ⇒ String
TODO: Write general description for this method
28 29 30 |
# File 'lib/bandwidth/voice_lib/voice/models/api_call_state_response.rb', line 28 def to @to end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 157 158 159 160 161 162 |
# File 'lib/bandwidth/voice_lib/voice/models/api_call_state_response.rb', line 124 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. call_id = hash['callId'] parent_call_id = hash['parentCallId'] application_id = hash['applicationId'] account_id = hash['accountId'] to = hash['to'] from = hash['from'] direction = hash['direction'] state = hash['state'] start_time = APIHelper.rfc3339(hash['startTime']) if hash['startTime'] answer_time = APIHelper.rfc3339(hash['answerTime']) if hash['answerTime'] end_time = APIHelper.rfc3339(hash['endTime']) if hash['endTime'] disconnect_cause = hash['disconnectCause'] = hash['errorMessage'] error_id = hash['errorId'] last_update = APIHelper.rfc3339(hash['lastUpdate']) if hash['lastUpdate'] # Create object from extracted values. ApiCallStateResponse.new(call_id, parent_call_id, application_id, account_id, to, from, direction, state, start_time, answer_time, end_time, disconnect_cause, , error_id, last_update) end |
.names ⇒ Object
A mapping from model property names to API property names.
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/bandwidth/voice_lib/voice/models/api_call_state_response.rb', line 71 def self.names @_hash = {} if @_hash.nil? @_hash['call_id'] = 'callId' @_hash['parent_call_id'] = 'parentCallId' @_hash['application_id'] = 'applicationId' @_hash['account_id'] = 'accountId' @_hash['to'] = 'to' @_hash['from'] = 'from' @_hash['direction'] = 'direction' @_hash['state'] = 'state' @_hash['start_time'] = 'startTime' @_hash['answer_time'] = 'answerTime' @_hash['end_time'] = 'endTime' @_hash['disconnect_cause'] = 'disconnectCause' @_hash['error_message'] = 'errorMessage' @_hash['error_id'] = 'errorId' @_hash['last_update'] = 'lastUpdate' @_hash end |