class OTRS::Ticket::Type
Attributes
id[RW]
name[RW]
Public Class Methods
all()
click to toggle source
# File lib/otrs_connector/otrs/ticket/type.rb, line 14 def self.all data = { 'UserID' => 1 } params = { :object => 'TicketObject', :method => 'TicketTypeList', :data => data } a = connect(params) a = Hash[*a] b = [] a.each do |key,value| c = {} c[key] = value b << c end c = self.superclass::Relation.new b.each do |d| d.each do |key,value| tmp = {} tmp[:id] = key tmp[:name] = value c << new(tmp) end end c end
all_name()
click to toggle source
# File lib/otrs_connector/otrs/ticket/type.rb, line 37 def self.all_name collection = [] self.all.each do |s| collection << s.name end return collection end
new(attributes = {})
click to toggle source
# File lib/otrs_connector/otrs/ticket/type.rb, line 8 def initialize(attributes = {}) attributes.each do |name, value| send("#{name.to_s.underscore.to_sym}=", value) end end
Public Instance Methods
persisted?()
click to toggle source
# File lib/otrs_connector/otrs/ticket/type.rb, line 4 def persisted? false end