# bandwidth # # This file was automatically generated by APIMATIC v2.0 # ( https://apimatic.io ). module Bandwidth # BandwidthCallbackMessageVoice Model. class BandwidthCallbackMessageVoice < BaseModel # TODO: Write general description for this method # @return [String] attr_accessor :call_id # TODO: Write general description for this method # @return [String] attr_accessor :start_time # TODO: Write general description for this method # @return [String] attr_accessor :direction # TODO: Write general description for this method # @return [String] attr_accessor :from # TODO: Write general description for this method # @return [String] attr_accessor :to # TODO: Write general description for this method # @return [String] attr_accessor :digits # TODO: Write general description for this method # @return [String] attr_accessor :event_type # TODO: Write general description for this method # @return [String] attr_accessor :call_url # A mapping from model property names to API property names. def self.names @_hash = {} if @_hash.nil? @_hash['call_id'] = 'callId' @_hash['start_time'] = 'startTime' @_hash['direction'] = 'direction' @_hash['from'] = 'from' @_hash['to'] = 'to' @_hash['digits'] = 'digits' @_hash['event_type'] = 'eventType' @_hash['call_url'] = 'callUrl' @_hash end def initialize(call_id = nil, start_time = nil, direction = nil, from = nil, to = nil, digits = nil, event_type = nil, call_url = nil) @call_id = call_id @start_time = start_time @direction = direction @from = from @to = to @digits = digits @event_type = event_type @call_url = call_url end # Creates an instance of the object from a hash. def self.from_hash(hash) return nil unless hash # Extract variables from the hash. call_id = hash['callId'] start_time = hash['startTime'] direction = hash['direction'] from = hash['from'] to = hash['to'] digits = hash['digits'] event_type = hash['eventType'] call_url = hash['callUrl'] # Create object from extracted values. BandwidthCallbackMessageVoice.new(call_id, start_time, direction, from, to, digits, event_type, call_url) end end end