Class: OTRS::Change::WorkOrder

Inherits:
OTRS
  • Object
show all
Defined in:
lib/otrs_connector/otrs/change/work_order.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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 = {}) ⇒ WorkOrder

Returns a new instance of WorkOrder.



138
139
140
141
142
143
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 138

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

Instance Attribute Details

#accounted_timeObject

Returns the value of attribute accounted_time.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def accounted_time
  @accounted_time
end

#actual_end_timeObject

Returns the value of attribute actual_end_time.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def actual_end_time
  @actual_end_time
end

#actual_start_timeObject

Returns the value of attribute actual_start_time.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def actual_start_time
  @actual_start_time
end

#change_byObject

Returns the value of attribute change_by.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def change_by
  @change_by
end

#change_idObject

Returns the value of attribute change_id.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def change_id
  @change_id
end

#change_timeObject

Returns the value of attribute change_time.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def change_time
  @change_time
end

#create_byObject

Returns the value of attribute create_by.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def create_by
  @create_by
end

#create_timeObject

Returns the value of attribute create_time.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def create_time
  @create_time
end

#instructionObject

Returns the value of attribute instruction.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def instruction
  @instruction
end

#instruction_plainObject

Returns the value of attribute instruction_plain.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def instruction_plain
  @instruction_plain
end

#planned_effortObject

Returns the value of attribute planned_effort.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def planned_effort
  @planned_effort
end

#planned_end_timeObject

Returns the value of attribute planned_end_time.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def planned_end_time
  @planned_end_time
end

#planned_start_timeObject

Returns the value of attribute planned_start_time.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def planned_start_time
  @planned_start_time
end

#reportObject

Returns the value of attribute report.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def report
  @report
end

#report_plainObject

Returns the value of attribute report_plain.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def report_plain
  @report_plain
end

#work_order_agent_idObject

Returns the value of attribute work_order_agent_id.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_agent_id
  @work_order_agent_id
end

#work_order_free_key1Object

Returns the value of attribute work_order_free_key1.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_key1
  @work_order_free_key1
end

#work_order_free_key10Object

Returns the value of attribute work_order_free_key10.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_key10
  @work_order_free_key10
end

#work_order_free_key11Object

Returns the value of attribute work_order_free_key11.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_key11
  @work_order_free_key11
end

#work_order_free_key12Object

Returns the value of attribute work_order_free_key12.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_key12
  @work_order_free_key12
end

#work_order_free_key13Object

Returns the value of attribute work_order_free_key13.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_key13
  @work_order_free_key13
end

#work_order_free_key14Object

Returns the value of attribute work_order_free_key14.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_key14
  @work_order_free_key14
end

#work_order_free_key15Object

Returns the value of attribute work_order_free_key15.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_key15
  @work_order_free_key15
end

#work_order_free_key16Object

Returns the value of attribute work_order_free_key16.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_key16
  @work_order_free_key16
end

#work_order_free_key17Object

Returns the value of attribute work_order_free_key17.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_key17
  @work_order_free_key17
end

#work_order_free_key18Object

Returns the value of attribute work_order_free_key18.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_key18
  @work_order_free_key18
end

#work_order_free_key19Object

Returns the value of attribute work_order_free_key19.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_key19
  @work_order_free_key19
end

#work_order_free_key2Object

Returns the value of attribute work_order_free_key2.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_key2
  @work_order_free_key2
end

#work_order_free_key20Object

Returns the value of attribute work_order_free_key20.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_key20
  @work_order_free_key20
end

#work_order_free_key21Object

Returns the value of attribute work_order_free_key21.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_key21
  @work_order_free_key21
end

#work_order_free_key22Object

Returns the value of attribute work_order_free_key22.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_key22
  @work_order_free_key22
end

#work_order_free_key23Object

Returns the value of attribute work_order_free_key23.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_key23
  @work_order_free_key23
end

#work_order_free_key24Object

Returns the value of attribute work_order_free_key24.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_key24
  @work_order_free_key24
end

#work_order_free_key25Object

Returns the value of attribute work_order_free_key25.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_key25
  @work_order_free_key25
end

#work_order_free_key26Object

Returns the value of attribute work_order_free_key26.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_key26
  @work_order_free_key26
end

#work_order_free_key27Object

Returns the value of attribute work_order_free_key27.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_key27
  @work_order_free_key27
end

#work_order_free_key28Object

Returns the value of attribute work_order_free_key28.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_key28
  @work_order_free_key28
end

#work_order_free_key29Object

Returns the value of attribute work_order_free_key29.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_key29
  @work_order_free_key29
end

#work_order_free_key3Object

Returns the value of attribute work_order_free_key3.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_key3
  @work_order_free_key3
end

#work_order_free_key30Object

Returns the value of attribute work_order_free_key30.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_key30
  @work_order_free_key30
end

#work_order_free_key31Object

Returns the value of attribute work_order_free_key31.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_key31
  @work_order_free_key31
end

#work_order_free_key32Object

Returns the value of attribute work_order_free_key32.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_key32
  @work_order_free_key32
end

#work_order_free_key33Object

Returns the value of attribute work_order_free_key33.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_key33
  @work_order_free_key33
end

#work_order_free_key34Object

Returns the value of attribute work_order_free_key34.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_key34
  @work_order_free_key34
end

#work_order_free_key35Object

Returns the value of attribute work_order_free_key35.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_key35
  @work_order_free_key35
end

#work_order_free_key36Object

Returns the value of attribute work_order_free_key36.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_key36
  @work_order_free_key36
end

#work_order_free_key37Object

Returns the value of attribute work_order_free_key37.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_key37
  @work_order_free_key37
end

#work_order_free_key38Object

Returns the value of attribute work_order_free_key38.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_key38
  @work_order_free_key38
end

#work_order_free_key39Object

Returns the value of attribute work_order_free_key39.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_key39
  @work_order_free_key39
end

#work_order_free_key4Object

Returns the value of attribute work_order_free_key4.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_key4
  @work_order_free_key4
end

#work_order_free_key40Object

Returns the value of attribute work_order_free_key40.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_key40
  @work_order_free_key40
end

#work_order_free_key41Object

Returns the value of attribute work_order_free_key41.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_key41
  @work_order_free_key41
end

#work_order_free_key42Object

Returns the value of attribute work_order_free_key42.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_key42
  @work_order_free_key42
end

#work_order_free_key43Object

Returns the value of attribute work_order_free_key43.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_key43
  @work_order_free_key43
end

#work_order_free_key44Object

Returns the value of attribute work_order_free_key44.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_key44
  @work_order_free_key44
end

#work_order_free_key45Object

Returns the value of attribute work_order_free_key45.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_key45
  @work_order_free_key45
end

#work_order_free_key46Object

Returns the value of attribute work_order_free_key46.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_key46
  @work_order_free_key46
end

#work_order_free_key47Object

Returns the value of attribute work_order_free_key47.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_key47
  @work_order_free_key47
end

#work_order_free_key48Object

Returns the value of attribute work_order_free_key48.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_key48
  @work_order_free_key48
end

#work_order_free_key49Object

Returns the value of attribute work_order_free_key49.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_key49
  @work_order_free_key49
end

#work_order_free_key5Object

Returns the value of attribute work_order_free_key5.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_key5
  @work_order_free_key5
end

#work_order_free_key50Object

Returns the value of attribute work_order_free_key50.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_key50
  @work_order_free_key50
end

#work_order_free_key6Object

Returns the value of attribute work_order_free_key6.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_key6
  @work_order_free_key6
end

#work_order_free_key7Object

Returns the value of attribute work_order_free_key7.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_key7
  @work_order_free_key7
end

#work_order_free_key8Object

Returns the value of attribute work_order_free_key8.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_key8
  @work_order_free_key8
end

#work_order_free_key9Object

Returns the value of attribute work_order_free_key9.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_key9
  @work_order_free_key9
end

#work_order_free_text1Object

Returns the value of attribute work_order_free_text1.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_text1
  @work_order_free_text1
end

#work_order_free_text10Object

Returns the value of attribute work_order_free_text10.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_text10
  @work_order_free_text10
end

#work_order_free_text11Object

Returns the value of attribute work_order_free_text11.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_text11
  @work_order_free_text11
end

#work_order_free_text12Object

Returns the value of attribute work_order_free_text12.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_text12
  @work_order_free_text12
end

#work_order_free_text13Object

Returns the value of attribute work_order_free_text13.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_text13
  @work_order_free_text13
end

#work_order_free_text14Object

Returns the value of attribute work_order_free_text14.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_text14
  @work_order_free_text14
end

#work_order_free_text15Object

Returns the value of attribute work_order_free_text15.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_text15
  @work_order_free_text15
end

#work_order_free_text16Object

Returns the value of attribute work_order_free_text16.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_text16
  @work_order_free_text16
end

#work_order_free_text17Object

Returns the value of attribute work_order_free_text17.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_text17
  @work_order_free_text17
end

#work_order_free_text18Object

Returns the value of attribute work_order_free_text18.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_text18
  @work_order_free_text18
end

#work_order_free_text19Object

Returns the value of attribute work_order_free_text19.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_text19
  @work_order_free_text19
end

#work_order_free_text2Object

Returns the value of attribute work_order_free_text2.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_text2
  @work_order_free_text2
end

#work_order_free_text20Object

Returns the value of attribute work_order_free_text20.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_text20
  @work_order_free_text20
end

#work_order_free_text21Object

Returns the value of attribute work_order_free_text21.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_text21
  @work_order_free_text21
end

#work_order_free_text22Object

Returns the value of attribute work_order_free_text22.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_text22
  @work_order_free_text22
end

#work_order_free_text23Object

Returns the value of attribute work_order_free_text23.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_text23
  @work_order_free_text23
end

#work_order_free_text24Object

Returns the value of attribute work_order_free_text24.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_text24
  @work_order_free_text24
end

#work_order_free_text25Object

Returns the value of attribute work_order_free_text25.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_text25
  @work_order_free_text25
end

#work_order_free_text26Object

Returns the value of attribute work_order_free_text26.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_text26
  @work_order_free_text26
end

#work_order_free_text27Object

Returns the value of attribute work_order_free_text27.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_text27
  @work_order_free_text27
end

#work_order_free_text28Object

Returns the value of attribute work_order_free_text28.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_text28
  @work_order_free_text28
end

#work_order_free_text29Object

Returns the value of attribute work_order_free_text29.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_text29
  @work_order_free_text29
end

#work_order_free_text3Object

Returns the value of attribute work_order_free_text3.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_text3
  @work_order_free_text3
end

#work_order_free_text30Object

Returns the value of attribute work_order_free_text30.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_text30
  @work_order_free_text30
end

#work_order_free_text31Object

Returns the value of attribute work_order_free_text31.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_text31
  @work_order_free_text31
end

#work_order_free_text32Object

Returns the value of attribute work_order_free_text32.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_text32
  @work_order_free_text32
end

#work_order_free_text33Object

Returns the value of attribute work_order_free_text33.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_text33
  @work_order_free_text33
end

#work_order_free_text34Object

Returns the value of attribute work_order_free_text34.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_text34
  @work_order_free_text34
end

#work_order_free_text35Object

Returns the value of attribute work_order_free_text35.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_text35
  @work_order_free_text35
end

#work_order_free_text36Object

Returns the value of attribute work_order_free_text36.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_text36
  @work_order_free_text36
end

#work_order_free_text37Object

Returns the value of attribute work_order_free_text37.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_text37
  @work_order_free_text37
end

#work_order_free_text38Object

Returns the value of attribute work_order_free_text38.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_text38
  @work_order_free_text38
end

#work_order_free_text39Object

Returns the value of attribute work_order_free_text39.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_text39
  @work_order_free_text39
end

#work_order_free_text4Object

Returns the value of attribute work_order_free_text4.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_text4
  @work_order_free_text4
end

#work_order_free_text40Object

Returns the value of attribute work_order_free_text40.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_text40
  @work_order_free_text40
end

#work_order_free_text41Object

Returns the value of attribute work_order_free_text41.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_text41
  @work_order_free_text41
end

#work_order_free_text42Object

Returns the value of attribute work_order_free_text42.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_text42
  @work_order_free_text42
end

#work_order_free_text43Object

Returns the value of attribute work_order_free_text43.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_text43
  @work_order_free_text43
end

#work_order_free_text44Object

Returns the value of attribute work_order_free_text44.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_text44
  @work_order_free_text44
end

#work_order_free_text45Object

Returns the value of attribute work_order_free_text45.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_text45
  @work_order_free_text45
end

#work_order_free_text46Object

Returns the value of attribute work_order_free_text46.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_text46
  @work_order_free_text46
end

#work_order_free_text47Object

Returns the value of attribute work_order_free_text47.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_text47
  @work_order_free_text47
end

#work_order_free_text48Object

Returns the value of attribute work_order_free_text48.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_text48
  @work_order_free_text48
end

#work_order_free_text49Object

Returns the value of attribute work_order_free_text49.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_text49
  @work_order_free_text49
end

#work_order_free_text5Object

Returns the value of attribute work_order_free_text5.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_text5
  @work_order_free_text5
end

#work_order_free_text50Object

Returns the value of attribute work_order_free_text50.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_text50
  @work_order_free_text50
end

#work_order_free_text6Object

Returns the value of attribute work_order_free_text6.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_text6
  @work_order_free_text6
end

#work_order_free_text7Object

Returns the value of attribute work_order_free_text7.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_text7
  @work_order_free_text7
end

#work_order_free_text8Object

Returns the value of attribute work_order_free_text8.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_text8
  @work_order_free_text8
end

#work_order_free_text9Object

Returns the value of attribute work_order_free_text9.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_free_text9
  @work_order_free_text9
end

#work_order_idObject

Returns the value of attribute work_order_id.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_id
  @work_order_id
end

#work_order_numberObject

Returns the value of attribute work_order_number.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_number
  @work_order_number
end

#work_order_stateObject

Returns the value of attribute work_order_state.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_state
  @work_order_state
end

#work_order_state_idObject

Returns the value of attribute work_order_state_id.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_state_id
  @work_order_state_id
end

#work_order_state_signalObject

Returns the value of attribute work_order_state_signal.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_state_signal
  @work_order_state_signal
end

#work_order_titleObject

Returns the value of attribute work_order_title.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_title
  @work_order_title
end

#work_order_typeObject

Returns the value of attribute work_order_type.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_type
  @work_order_type
end

#work_order_type_idObject

Returns the value of attribute work_order_type_id.



3
4
5
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 3

def work_order_type_id
  @work_order_type_id
end

Class Method Details

.find(id) ⇒ Object



192
193
194
195
196
197
198
199
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 192

def self.find(id)
  data = { 'WorkOrderID' => id, 'UserID' => 1 }
  params = { :object => 'WorkOrderObject', :method => 'WorkOrderGet', :data => data }
  object = self.object_preprocessor connect(params)
  object.run_callbacks :find do
    object
  end
end

.where(attributes) ⇒ Object



213
214
215
216
217
218
219
220
221
222
223
224
225
226
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 213

def self.where(attributes)
  tmp = {}
  attributes.each do |key,value|
    tmp[key.to_s.camelize] = value      #Copies ruby style keys to camel case for OTRS
  end
  data = tmp
  params = { :object => 'WorkOrderObjectCustom', :method => 'WorkOrderSearch', :data => data }
  a = connect(params).flatten
  results = self.superclass::Relation.new
  a.each do |c|
    results << self.new(c)
  end
  results
end

Instance Method Details

#changeObject



228
229
230
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 228

def change
  self.class.superclass::Change.find(self.change_id)
end

#create(attributes) ⇒ Object



149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 149

def create(attributes)
  tmp = {}
  attributes.each do |key,value|
    tmp[key.to_s.camelize.to_sym] = value
  end
  attributes = tmp
  attributes[:UserID] = '1'
  attributes[:ChangeID] = attributes[:ChangeId]
  attributes.delete(:ChangeId)
  data = attributes
  params = { :object => 'WorkOrderObject', :method => 'WorkOrderAdd', :data => data }
  a = connect(params)
  id = a.first
  if id.nil?
    nil
  else
    b = self.class.find(id)
    attributes = b.attributes
    attributes.each do |key,value|
      instance_variable_set "@#{key.to_s}", value
    end
    b
  end
end

#destroyObject



201
202
203
204
205
206
207
208
209
210
211
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 201

def destroy
  id = @change_id
  if self.class.find(id)
    data = { 'ChangeID' => id, 'UserID' => 1 }
    params = { :object => 'WorkOrderObject', :method => 'WorkOrderDelete', :data => data }
    connect(params)
    "WorkOrderID #{id} deleted"
  else
    raise "NoSuchWorkOrderID #{id}"
  end
end

#idObject



240
241
242
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 240

def id
  self.work_order_id
end

#nameObject



232
233
234
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 232

def name
  self.work_order_title
end

#persisted?Boolean

def self.set_accessor(key)

attr_accessor key.to_sym

end

Returns:

  • (Boolean)


134
135
136
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 134

def persisted?
  false
end

#saveObject



145
146
147
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 145

def save
  self.create(self.attributes)
end

#statusObject



244
245
246
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 244

def status
  self.work_order_status
end

#titleObject



236
237
238
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 236

def title
  self.work_order_title
end

#update_attributes(attributes) ⇒ Object



174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
# File 'lib/otrs_connector/otrs/change/work_order.rb', line 174

def update_attributes(attributes)
  run_callbacks :update do
    tmp = {}
    attributes.each do |key,value|
      tmp[key.to_s.camelize] = value      #Copies ruby style keys to camel case for OTRS
    end
    tmp['WorkOrderID'] = @work_order_id
    data = tmp
    params = { :object => 'WorkOrderObject', :method => 'WorkOrderUpdate', :data => data }
    a = connect(params)
    if a.first.nil?
      nil
    else
      return self
    end
  end
end