class Bandwidth::Tag
Tag
Model.
Attributes
key[RW]
TODO: Write general description for this method @return [String]
value[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/tag.rb, line 32 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. key = hash['key'] value = hash['value'] # Create object from extracted values. Tag.new(key, value) end
names()
click to toggle source
A mapping from model property names to API property names.
# File lib/bandwidth/messaging_lib/messaging/models/tag.rb, line 18 def self.names @_hash = {} if @_hash.nil? @_hash['key'] = 'key' @_hash['value'] = 'value' @_hash end
new(key = nil, value = nil)
click to toggle source
# File lib/bandwidth/messaging_lib/messaging/models/tag.rb, line 25 def initialize(key = nil, value = nil) @key = key @value = value end