class Bandwidth::CreateCallResponse

CreateCallResponse Model.

Attributes

account_id[RW]

TODO: Write general description for this method @return [String]

answer_fallback_method[RW]

TODO: Write general description for this method @return [AnswerFallbackMethodEnum]

answer_fallback_url[RW]

TODO: Write general description for this method @return [String]

answer_method[RW]

TODO: Write general description for this method @return [AnswerMethodEnum]

answer_url[RW]

TODO: Write general description for this method @return [String]

application_id[RW]

TODO: Write general description for this method @return [String]

call_id[RW]

TODO: Write general description for this method @return [String]

call_timeout[RW]

TODO: Write general description for this method @return [Float]

call_url[RW]

TODO: Write general description for this method @return [String]

callback_timeout[RW]

TODO: Write general description for this method @return [Float]

disconnect_method[RW]

TODO: Write general description for this method @return [DisconnectMethodEnum]

disconnect_url[RW]

TODO: Write general description for this method @return [String]

fallback_password[RW]

TODO: Write general description for this method @return [String]

fallback_username[RW]

TODO: Write general description for this method @return [String]

from[RW]

TODO: Write general description for this method @return [String]

password[RW]

TODO: Write general description for this method @return [String]

start_time[RW]

TODO: Write general description for this method @return [DateTime]

tag[RW]

TODO: Write general description for this method @return [String]

to[RW]

TODO: Write general description for this method @return [String]

username[RW]

TODO: Write general description for this method @return [String]

Public Class Methods

from_hash(hash) click to toggle source

Creates an instance of the object from a hash.

# File lib/bandwidth/voice_lib/voice/models/create_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 = DateTimeHelper.from_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.
  CreateCallResponse.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() click to toggle source

A mapping from model property names to API property names.

# File lib/bandwidth/voice_lib/voice/models/create_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
new(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) click to toggle source
# File lib/bandwidth/voice_lib/voice/models/create_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

Public Instance Methods

to_start_time() click to toggle source
# File lib/bandwidth/voice_lib/voice/models/create_call_response.rb, line 208
def to_start_time
  DateTimeHelper.to_rfc3339(start_time)
end