Class: OTRS::Change

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

Direct Known Subclasses

State

Defined Under Namespace

Classes: State, WorkOrder

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

Returns a new instance of Change.



69
70
71
72
73
74
# File 'lib/otrs_connector/otrs/change.rb', line 69

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.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.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.rb', line 3

def actual_start_time
  @actual_start_time
end

#cab_agentsObject

Returns the value of attribute cab_agents.



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

def cab_agents
  @cab_agents
end

#cab_customersObject

Returns the value of attribute cab_customers.



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

def cab_customers
  @cab_customers
end

#categoryObject

Returns the value of attribute category.



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

def category
  @category
end

#category_idObject

Returns the value of attribute category_id.



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

def category_id
  @category_id
end

#change_builder_idObject

Returns the value of attribute change_builder_id.



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

def change_builder_id
  @change_builder_id
end

#change_byObject

Returns the value of attribute change_by.



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

def change_by
  @change_by
end

#change_free_key1Object

Returns the value of attribute change_free_key1.



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

def change_free_key1
  @change_free_key1
end

#change_free_key10Object

Returns the value of attribute change_free_key10.



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

def change_free_key10
  @change_free_key10
end

#change_free_key11Object

Returns the value of attribute change_free_key11.



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

def change_free_key11
  @change_free_key11
end

#change_free_key12Object

Returns the value of attribute change_free_key12.



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

def change_free_key12
  @change_free_key12
end

#change_free_key13Object

Returns the value of attribute change_free_key13.



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

def change_free_key13
  @change_free_key13
end

#change_free_key14Object

Returns the value of attribute change_free_key14.



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

def change_free_key14
  @change_free_key14
end

#change_free_key15Object

Returns the value of attribute change_free_key15.



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

def change_free_key15
  @change_free_key15
end

#change_free_key16Object

Returns the value of attribute change_free_key16.



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

def change_free_key16
  @change_free_key16
end

#change_free_key17Object

Returns the value of attribute change_free_key17.



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

def change_free_key17
  @change_free_key17
end

#change_free_key18Object

Returns the value of attribute change_free_key18.



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

def change_free_key18
  @change_free_key18
end

#change_free_key19Object

Returns the value of attribute change_free_key19.



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

def change_free_key19
  @change_free_key19
end

#change_free_key2Object

Returns the value of attribute change_free_key2.



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

def change_free_key2
  @change_free_key2
end

#change_free_key20Object

Returns the value of attribute change_free_key20.



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

def change_free_key20
  @change_free_key20
end

#change_free_key21Object

Returns the value of attribute change_free_key21.



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

def change_free_key21
  @change_free_key21
end

#change_free_key22Object

Returns the value of attribute change_free_key22.



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

def change_free_key22
  @change_free_key22
end

#change_free_key23Object

Returns the value of attribute change_free_key23.



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

def change_free_key23
  @change_free_key23
end

#change_free_key24Object

Returns the value of attribute change_free_key24.



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

def change_free_key24
  @change_free_key24
end

#change_free_key25Object

Returns the value of attribute change_free_key25.



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

def change_free_key25
  @change_free_key25
end

#change_free_key26Object

Returns the value of attribute change_free_key26.



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

def change_free_key26
  @change_free_key26
end

#change_free_key27Object

Returns the value of attribute change_free_key27.



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

def change_free_key27
  @change_free_key27
end

#change_free_key28Object

Returns the value of attribute change_free_key28.



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

def change_free_key28
  @change_free_key28
end

#change_free_key29Object

Returns the value of attribute change_free_key29.



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

def change_free_key29
  @change_free_key29
end

#change_free_key3Object

Returns the value of attribute change_free_key3.



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

def change_free_key3
  @change_free_key3
end

#change_free_key30Object

Returns the value of attribute change_free_key30.



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

def change_free_key30
  @change_free_key30
end

#change_free_key31Object

Returns the value of attribute change_free_key31.



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

def change_free_key31
  @change_free_key31
end

#change_free_key32Object

Returns the value of attribute change_free_key32.



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

def change_free_key32
  @change_free_key32
end

#change_free_key33Object

Returns the value of attribute change_free_key33.



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

def change_free_key33
  @change_free_key33
end

#change_free_key34Object

Returns the value of attribute change_free_key34.



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

def change_free_key34
  @change_free_key34
end

#change_free_key35Object

Returns the value of attribute change_free_key35.



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

def change_free_key35
  @change_free_key35
end

#change_free_key36Object

Returns the value of attribute change_free_key36.



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

def change_free_key36
  @change_free_key36
end

#change_free_key37Object

Returns the value of attribute change_free_key37.



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

def change_free_key37
  @change_free_key37
end

#change_free_key38Object

Returns the value of attribute change_free_key38.



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

def change_free_key38
  @change_free_key38
end

#change_free_key39Object

Returns the value of attribute change_free_key39.



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

def change_free_key39
  @change_free_key39
end

#change_free_key4Object

Returns the value of attribute change_free_key4.



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

def change_free_key4
  @change_free_key4
end

#change_free_key40Object

Returns the value of attribute change_free_key40.



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

def change_free_key40
  @change_free_key40
end

#change_free_key41Object

Returns the value of attribute change_free_key41.



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

def change_free_key41
  @change_free_key41
end

#change_free_key42Object

Returns the value of attribute change_free_key42.



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

def change_free_key42
  @change_free_key42
end

#change_free_key43Object

Returns the value of attribute change_free_key43.



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

def change_free_key43
  @change_free_key43
end

#change_free_key44Object

Returns the value of attribute change_free_key44.



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

def change_free_key44
  @change_free_key44
end

#change_free_key45Object

Returns the value of attribute change_free_key45.



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

def change_free_key45
  @change_free_key45
end

#change_free_key46Object

Returns the value of attribute change_free_key46.



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

def change_free_key46
  @change_free_key46
end

#change_free_key47Object

Returns the value of attribute change_free_key47.



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

def change_free_key47
  @change_free_key47
end

#change_free_key48Object

Returns the value of attribute change_free_key48.



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

def change_free_key48
  @change_free_key48
end

#change_free_key49Object

Returns the value of attribute change_free_key49.



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

def change_free_key49
  @change_free_key49
end

#change_free_key5Object

Returns the value of attribute change_free_key5.



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

def change_free_key5
  @change_free_key5
end

#change_free_key50Object

Returns the value of attribute change_free_key50.



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

def change_free_key50
  @change_free_key50
end

#change_free_key6Object

Returns the value of attribute change_free_key6.



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

def change_free_key6
  @change_free_key6
end

#change_free_key7Object

Returns the value of attribute change_free_key7.



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

def change_free_key7
  @change_free_key7
end

#change_free_key8Object

Returns the value of attribute change_free_key8.



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

def change_free_key8
  @change_free_key8
end

#change_free_key9Object

Returns the value of attribute change_free_key9.



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

def change_free_key9
  @change_free_key9
end

#change_free_text1Object

Returns the value of attribute change_free_text1.



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

def change_free_text1
  @change_free_text1
end

#change_free_text10Object

Returns the value of attribute change_free_text10.



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

def change_free_text10
  @change_free_text10
end

#change_free_text11Object

Returns the value of attribute change_free_text11.



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

def change_free_text11
  @change_free_text11
end

#change_free_text12Object

Returns the value of attribute change_free_text12.



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

def change_free_text12
  @change_free_text12
end

#change_free_text13Object

Returns the value of attribute change_free_text13.



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

def change_free_text13
  @change_free_text13
end

#change_free_text14Object

Returns the value of attribute change_free_text14.



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

def change_free_text14
  @change_free_text14
end

#change_free_text15Object

Returns the value of attribute change_free_text15.



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

def change_free_text15
  @change_free_text15
end

#change_free_text16Object

Returns the value of attribute change_free_text16.



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

def change_free_text16
  @change_free_text16
end

#change_free_text17Object

Returns the value of attribute change_free_text17.



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

def change_free_text17
  @change_free_text17
end

#change_free_text18Object

Returns the value of attribute change_free_text18.



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

def change_free_text18
  @change_free_text18
end

#change_free_text19Object

Returns the value of attribute change_free_text19.



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

def change_free_text19
  @change_free_text19
end

#change_free_text2Object

Returns the value of attribute change_free_text2.



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

def change_free_text2
  @change_free_text2
end

#change_free_text20Object

Returns the value of attribute change_free_text20.



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

def change_free_text20
  @change_free_text20
end

#change_free_text21Object

Returns the value of attribute change_free_text21.



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

def change_free_text21
  @change_free_text21
end

#change_free_text22Object

Returns the value of attribute change_free_text22.



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

def change_free_text22
  @change_free_text22
end

#change_free_text23Object

Returns the value of attribute change_free_text23.



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

def change_free_text23
  @change_free_text23
end

#change_free_text24Object

Returns the value of attribute change_free_text24.



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

def change_free_text24
  @change_free_text24
end

#change_free_text25Object

Returns the value of attribute change_free_text25.



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

def change_free_text25
  @change_free_text25
end

#change_free_text26Object

Returns the value of attribute change_free_text26.



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

def change_free_text26
  @change_free_text26
end

#change_free_text27Object

Returns the value of attribute change_free_text27.



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

def change_free_text27
  @change_free_text27
end

#change_free_text28Object

Returns the value of attribute change_free_text28.



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

def change_free_text28
  @change_free_text28
end

#change_free_text29Object

Returns the value of attribute change_free_text29.



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

def change_free_text29
  @change_free_text29
end

#change_free_text3Object

Returns the value of attribute change_free_text3.



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

def change_free_text3
  @change_free_text3
end

#change_free_text30Object

Returns the value of attribute change_free_text30.



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

def change_free_text30
  @change_free_text30
end

#change_free_text31Object

Returns the value of attribute change_free_text31.



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

def change_free_text31
  @change_free_text31
end

#change_free_text32Object

Returns the value of attribute change_free_text32.



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

def change_free_text32
  @change_free_text32
end

#change_free_text33Object

Returns the value of attribute change_free_text33.



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

def change_free_text33
  @change_free_text33
end

#change_free_text34Object

Returns the value of attribute change_free_text34.



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

def change_free_text34
  @change_free_text34
end

#change_free_text35Object

Returns the value of attribute change_free_text35.



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

def change_free_text35
  @change_free_text35
end

#change_free_text36Object

Returns the value of attribute change_free_text36.



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

def change_free_text36
  @change_free_text36
end

#change_free_text37Object

Returns the value of attribute change_free_text37.



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

def change_free_text37
  @change_free_text37
end

#change_free_text38Object

Returns the value of attribute change_free_text38.



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

def change_free_text38
  @change_free_text38
end

#change_free_text39Object

Returns the value of attribute change_free_text39.



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

def change_free_text39
  @change_free_text39
end

#change_free_text4Object

Returns the value of attribute change_free_text4.



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

def change_free_text4
  @change_free_text4
end

#change_free_text40Object

Returns the value of attribute change_free_text40.



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

def change_free_text40
  @change_free_text40
end

#change_free_text41Object

Returns the value of attribute change_free_text41.



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

def change_free_text41
  @change_free_text41
end

#change_free_text42Object

Returns the value of attribute change_free_text42.



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

def change_free_text42
  @change_free_text42
end

#change_free_text43Object

Returns the value of attribute change_free_text43.



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

def change_free_text43
  @change_free_text43
end

#change_free_text44Object

Returns the value of attribute change_free_text44.



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

def change_free_text44
  @change_free_text44
end

#change_free_text45Object

Returns the value of attribute change_free_text45.



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

def change_free_text45
  @change_free_text45
end

#change_free_text46Object

Returns the value of attribute change_free_text46.



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

def change_free_text46
  @change_free_text46
end

#change_free_text47Object

Returns the value of attribute change_free_text47.



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

def change_free_text47
  @change_free_text47
end

#change_free_text48Object

Returns the value of attribute change_free_text48.



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

def change_free_text48
  @change_free_text48
end

#change_free_text49Object

Returns the value of attribute change_free_text49.



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

def change_free_text49
  @change_free_text49
end

#change_free_text5Object

Returns the value of attribute change_free_text5.



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

def change_free_text5
  @change_free_text5
end

#change_free_text50Object

Returns the value of attribute change_free_text50.



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

def change_free_text50
  @change_free_text50
end

#change_free_text6Object

Returns the value of attribute change_free_text6.



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

def change_free_text6
  @change_free_text6
end

#change_free_text7Object

Returns the value of attribute change_free_text7.



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

def change_free_text7
  @change_free_text7
end

#change_free_text8Object

Returns the value of attribute change_free_text8.



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

def change_free_text8
  @change_free_text8
end

#change_free_text9Object

Returns the value of attribute change_free_text9.



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

def change_free_text9
  @change_free_text9
end

#change_idObject

Returns the value of attribute change_id.



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

def change_id
  @change_id
end

#change_manager_idObject

Returns the value of attribute change_manager_id.



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

def change_manager_id
  @change_manager_id
end

#change_numberObject

Returns the value of attribute change_number.



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

def change_number
  @change_number
end

#change_stateObject

Returns the value of attribute change_state.



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

def change_state
  @change_state
end

#change_state_idObject

Returns the value of attribute change_state_id.



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

def change_state_id
  @change_state_id
end

#change_state_signalObject

Returns the value of attribute change_state_signal.



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

def change_state_signal
  @change_state_signal
end

#change_timeObject

Returns the value of attribute change_time.



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

def change_time
  @change_time
end

#change_titleObject

Returns the value of attribute change_title.



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

def change_title
  @change_title
end

#create_byObject

Returns the value of attribute create_by.



3
4
5
# File 'lib/otrs_connector/otrs/change.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.rb', line 3

def create_time
  @create_time
end

#descriptionObject

Returns the value of attribute description.



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

def description
  @description
end

#description_plainObject

Returns the value of attribute description_plain.



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

def description_plain
  @description_plain
end

#impactObject

Returns the value of attribute impact.



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

def impact
  @impact
end

#impact_idObject

Returns the value of attribute impact_id.



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

def impact_id
  @impact_id
end

#justificationObject

Returns the value of attribute justification.



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

def justification
  @justification
end

#justification_plainObject

Returns the value of attribute justification_plain.



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

def justification_plain
  @justification_plain
end

#planned_effortObject

Returns the value of attribute planned_effort.



3
4
5
# File 'lib/otrs_connector/otrs/change.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.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.rb', line 3

def planned_start_time
  @planned_start_time
end

#priorityObject

Returns the value of attribute priority.



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

def priority
  @priority
end

#priority_idObject

Returns the value of attribute priority_id.



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

def priority_id
  @priority_id
end

#requested_timeObject

Returns the value of attribute requested_time.



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

def requested_time
  @requested_time
end

#work_order_countObject

Returns the value of attribute work_order_count.



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

def work_order_count
  @work_order_count
end

#work_order_i_dsObject

Returns the value of attribute work_order_i_ds.



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

def work_order_i_ds
  @work_order_i_ds
end

Class Method Details

.allObject



143
144
145
# File 'lib/otrs_connector/otrs/change.rb', line 143

def self.all
  self.where(:name => '%')
end

.find(id) ⇒ Object



100
101
102
103
104
105
106
107
# File 'lib/otrs_connector/otrs/change.rb', line 100

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

.where(attributes) ⇒ Object



112
113
114
115
116
117
118
119
120
121
122
123
124
125
# File 'lib/otrs_connector/otrs/change.rb', line 112

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 => 'ChangeObjectCustom', :method => 'ChangeSearch', :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

#create(attributes) ⇒ Object



82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# File 'lib/otrs_connector/otrs/change.rb', line 82

def create(attributes)
  tmp = {}
  attributes.each do |key,value|
     tmp[key.to_s.camelize.to_sym] = value
  end
  attributes = tmp
  attributes[:UserID] = '1'
  data = attributes
  params = { :object => 'ChangeObject', :method => 'ChangeAdd', :data => data }
  a = connect(params)
  id = a.first
  a = self.class.find(id)
  attributes = a.attributes
  attributes.each do |key,value|
    instance_variable_set "@#{key.to_s}", value
  end
end

#destroyObject



147
148
149
150
151
152
153
154
155
156
157
# File 'lib/otrs_connector/otrs/change.rb', line 147

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

#idObject



159
160
161
# File 'lib/otrs_connector/otrs/change.rb', line 159

def id
  self.change_id
end

#nameObject



175
176
177
# File 'lib/otrs_connector/otrs/change.rb', line 175

def name
  self.change_title
end

#persisted?Boolean

Returns:

  • (Boolean)


65
66
67
# File 'lib/otrs_connector/otrs/change.rb', line 65

def persisted?
  false
end

#saveObject



76
77
78
79
80
# File 'lib/otrs_connector/otrs/change.rb', line 76

def save
  run_callbacks :save do
    self.create(self.attributes)
  end
end

#statusObject



171
172
173
# File 'lib/otrs_connector/otrs/change.rb', line 171

def status
  self.change_state
end

#update_attributes(attributes) ⇒ Object



127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# File 'lib/otrs_connector/otrs/change.rb', line 127

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

#work_ordersObject



167
168
169
# File 'lib/otrs_connector/otrs/change.rb', line 167

def work_orders
  self.class::WorkOrder.where(:ChangeIDs => [self.id])
end