class Bandwidth::BandwidthCallbackMessage

BandwidthCallbackMessage Model.

Attributes

description[RW]

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

error_code[RW]

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

message[RW]

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

time[RW]

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

to[RW]

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

type[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/messaging_lib/messaging/models/bandwidth_callback_message.rb, line 60
def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  time = hash['time']
  type = hash['type']
  to = hash['to']
  error_code = hash['errorCode']
  description = hash['description']
  message = BandwidthMessage.from_hash(hash['message']) if hash['message']

  # Create object from extracted values.
  BandwidthCallbackMessage.new(time,
                               type,
                               to,
                               error_code,
                               description,
                               message)
end
names() click to toggle source

A mapping from model property names to API property names.

# File lib/bandwidth/messaging_lib/messaging/models/bandwidth_callback_message.rb, line 34
def self.names
  @_hash = {} if @_hash.nil?
  @_hash['time'] = 'time'
  @_hash['type'] = 'type'
  @_hash['to'] = 'to'
  @_hash['error_code'] = 'errorCode'
  @_hash['description'] = 'description'
  @_hash['message'] = 'message'
  @_hash
end
new(time = nil, type = nil, to = nil, error_code = nil, description = nil, message = nil) click to toggle source
# File lib/bandwidth/messaging_lib/messaging/models/bandwidth_callback_message.rb, line 45
def initialize(time = nil,
               type = nil,
               to = nil,
               error_code = nil,
               description = nil,
               message = nil)
  @time = time
  @type = type
  @to = to
  @error_code = error_code
  @description = description
  @message = message
end