Class: OTRS::Ticket::TicketQueue
- Inherits:
-
OTRS::Ticket
- Object
- OTRS
- OTRS::Ticket
- OTRS::Ticket::TicketQueue
- Defined in:
- lib/otrs_connector/otrs/ticket/ticket_queue.rb
Overview
Namespace conflict with OTRS::Ticket::Queue
Instance Attribute Summary
Attributes inherited from OTRS::Ticket
#age, #archive_flag, #changed, #create_time_unix, #created, #customer_id, #customer_user_id, #escalation_response_time, #escalation_solution_time, #escalation_time, #escalation_update_time, #group_id, #lock, #lock_id, #owner, #owner_id, #priority, #priority_id, #queue, #queue_id, #real_till_time_not_used, #responsible, #responsible_id, #service_id, #slaid, #state, #state_id, #state_type, #ticket_free_key1, #ticket_free_key10, #ticket_free_key11, #ticket_free_key12, #ticket_free_key13, #ticket_free_key14, #ticket_free_key15, #ticket_free_key16, #ticket_free_key2, #ticket_free_key3, #ticket_free_key4, #ticket_free_key5, #ticket_free_key6, #ticket_free_key7, #ticket_free_key8, #ticket_free_key9, #ticket_free_text1, #ticket_free_text10, #ticket_free_text11, #ticket_free_text12, #ticket_free_text13, #ticket_free_text14, #ticket_free_text15, #ticket_free_text16, #ticket_free_text2, #ticket_free_text3, #ticket_free_text4, #ticket_free_text5, #ticket_free_text6, #ticket_free_text7, #ticket_free_text8, #ticket_free_text9, #ticket_free_time1, #ticket_free_time2, #ticket_free_time3, #ticket_free_time4, #ticket_free_time5, #ticket_free_time6, #ticket_id, #ticket_number, #title, #type, #type_id, #unlock_timeout, #until_time
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ TicketQueue
constructor
A new instance of TicketQueue.
- #persisted? ⇒ Boolean
Methods inherited from OTRS::Ticket
#create, #destroy, find, free_text_fields, #id, #name, #save, #set_free_text_field, ticket_number_lookup, where
Methods inherited from OTRS
api_url, api_url=, #attributes, #connect, connect, get_from_remote, object_preprocessor, password, password=, process_response, setup_connection_params, user, user=
Constructor Details
#initialize(attributes = {}) ⇒ TicketQueue
Returns a new instance of TicketQueue.
10 11 12 13 14 15 |
# File 'lib/otrs_connector/otrs/ticket/ticket_queue.rb', line 10 def initialize(attributes = {}) attributes.each do |name, value| self.class.set_accessor(name.to_s.underscore) send("#{name.to_s.underscore.to_sym}=", value) end end |
Class Method Details
.all ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/otrs_connector/otrs/ticket/ticket_queue.rb', line 17 def self.all data = { 'UserID' => 1 } params = { :object => 'QueueObject', :method => 'QueueList', :data => data } a = connect(params) a = Hash[*a] b = [] a.each do |key,value| c = {} c[key] = value b << c end c = self.superclass.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 ⇒ Object
40 41 42 43 44 45 46 |
# File 'lib/otrs_connector/otrs/ticket/ticket_queue.rb', line 40 def self.all_name collection = [] self.all.each do |s| collection << s.name end return collection end |
.set_accessor(key) ⇒ Object
2 3 4 |
# File 'lib/otrs_connector/otrs/ticket/ticket_queue.rb', line 2 def self.set_accessor(key) attr_accessor key.to_sym end |
Instance Method Details
#persisted? ⇒ Boolean
6 7 8 |
# File 'lib/otrs_connector/otrs/ticket/ticket_queue.rb', line 6 def persisted? false end |