Class: SysAid::Ticket
- Inherits:
-
Object
- Object
- SysAid::Ticket
- Defined in:
- lib/sysaid/ticket.rb
Instance Attribute Summary collapse
-
#agreement ⇒ Object
Returns the value of attribute agreement.
-
#archive ⇒ Object
Returns the value of attribute archive.
-
#assign_counter ⇒ Object
Returns the value of attribute assign_counter.
-
#assigned_group ⇒ Object
Returns the value of attribute assigned_group.
-
#assigned_to ⇒ Object
Returns the value of attribute assigned_to.
-
#category ⇒ Object
Returns the value of attribute category.
-
#cc ⇒ Object
Returns the value of attribute cc.
-
#change_category ⇒ Object
Returns the value of attribute change_category.
-
#ciid ⇒ Object
Returns the value of attribute ciid.
-
#close_time ⇒ Object
Returns the value of attribute close_time.
-
#closure_information ⇒ Object
Returns the value of attribute closure_information.
-
#computer_id ⇒ Object
Returns the value of attribute computer_id.
-
#current_support_level ⇒ Object
Returns the value of attribute current_support_level.
-
#cust_int1 ⇒ Object
Returns the value of attribute cust_int1.
-
#cust_int2 ⇒ Object
Returns the value of attribute cust_int2.
-
#cust_list1 ⇒ Object
Returns the value of attribute cust_list1.
-
#cust_list2 ⇒ Object
Returns the value of attribute cust_list2.
-
#cust_notes ⇒ Object
Returns the value of attribute cust_notes.
-
#cust_text1 ⇒ Object
Returns the value of attribute cust_text1.
-
#cust_text2 ⇒ Object
Returns the value of attribute cust_text2.
-
#description ⇒ Object
Returns the value of attribute description.
-
#email_account ⇒ Object
Returns the value of attribute email_account.
-
#escalation ⇒ Object
Returns the value of attribute escalation.
-
#followup_text ⇒ Object
Returns the value of attribute followup_text.
-
#id ⇒ Object
Returns the value of attribute id.
-
#impact ⇒ Object
Returns the value of attribute impact.
-
#insert_time ⇒ Object
Returns the value of attribute insert_time.
-
#location ⇒ Object
Returns the value of attribute location.
-
#max_support_level ⇒ Object
Returns the value of attribute max_support_level.
-
#notes ⇒ Object
Returns the value of attribute notes.
-
#parent_link ⇒ Object
Returns the value of attribute parent_link.
-
#priority ⇒ Object
Returns the value of attribute priority.
-
#project_id ⇒ Object
Returns the value of attribute project_id.
-
#reopen_counter ⇒ Object
Returns the value of attribute reopen_counter.
-
#request_user ⇒ Object
Returns the value of attribute request_user.
-
#resolution ⇒ Object
Returns the value of attribute resolution.
-
#solution ⇒ Object
Returns the value of attribute solution.
-
#source ⇒ Object
Returns the value of attribute source.
-
#sr_sub_type ⇒ Object
Returns the value of attribute sr_sub_type.
-
#sr_type ⇒ Object
Returns the value of attribute sr_type.
-
#status ⇒ Object
Returns the value of attribute status.
-
#sub_category ⇒ Object
Returns the value of attribute sub_category.
-
#submit_user ⇒ Object
Returns the value of attribute submit_user.
-
#success_rating ⇒ Object
Returns the value of attribute success_rating.
-
#task_id ⇒ Object
Returns the value of attribute task_id.
-
#third_level_category ⇒ Object
Returns the value of attribute third_level_category.
-
#title ⇒ Object
Returns the value of attribute title.
-
#update_time ⇒ Object
Returns the value of attribute update_time.
-
#update_user ⇒ Object
Returns the value of attribute update_user.
-
#urgency ⇒ Object
Returns the value of attribute urgency.
-
#user_manager ⇒ Object
Returns the value of attribute user_manager.
-
#version ⇒ Object
Returns the value of attribute version.
-
#workaround ⇒ Object
Returns the value of attribute workaround.
Class Method Summary collapse
Instance Method Summary collapse
-
#delete ⇒ Object
Deletes a ticket from the SysAid server.
-
#initialize ⇒ Ticket
constructor
A new instance of Ticket.
-
#refresh ⇒ Object
Loads the latest ticket information from the SysAid server.
-
#save ⇒ Object
Saves a ticket back to the SysAid server.
Constructor Details
#initialize ⇒ Ticket
Returns a new instance of Ticket.
12 13 14 15 16 |
# File 'lib/sysaid/ticket.rb', line 12 def initialize self.close_time = Date.new self.insert_time = Date.new self.update_time = Date.new end |
Instance Attribute Details
#agreement ⇒ Object
Returns the value of attribute agreement.
4 5 6 |
# File 'lib/sysaid/ticket.rb', line 4 def agreement @agreement end |
#archive ⇒ Object
Returns the value of attribute archive.
4 5 6 |
# File 'lib/sysaid/ticket.rb', line 4 def archive @archive end |
#assign_counter ⇒ Object
Returns the value of attribute assign_counter.
4 5 6 |
# File 'lib/sysaid/ticket.rb', line 4 def assign_counter @assign_counter end |
#assigned_group ⇒ Object
Returns the value of attribute assigned_group.
4 5 6 |
# File 'lib/sysaid/ticket.rb', line 4 def assigned_group @assigned_group end |
#assigned_to ⇒ Object
Returns the value of attribute assigned_to.
4 5 6 |
# File 'lib/sysaid/ticket.rb', line 4 def assigned_to @assigned_to end |
#category ⇒ Object
Returns the value of attribute category.
4 5 6 |
# File 'lib/sysaid/ticket.rb', line 4 def category @category end |
#cc ⇒ Object
Returns the value of attribute cc.
4 5 6 |
# File 'lib/sysaid/ticket.rb', line 4 def cc @cc end |
#change_category ⇒ Object
Returns the value of attribute change_category.
4 5 6 |
# File 'lib/sysaid/ticket.rb', line 4 def change_category @change_category end |
#ciid ⇒ Object
Returns the value of attribute ciid.
4 5 6 |
# File 'lib/sysaid/ticket.rb', line 4 def ciid @ciid end |
#close_time ⇒ Object
Returns the value of attribute close_time.
4 5 6 |
# File 'lib/sysaid/ticket.rb', line 4 def close_time @close_time end |
#closure_information ⇒ Object
Returns the value of attribute closure_information.
4 5 6 |
# File 'lib/sysaid/ticket.rb', line 4 def closure_information @closure_information end |
#computer_id ⇒ Object
Returns the value of attribute computer_id.
4 5 6 |
# File 'lib/sysaid/ticket.rb', line 4 def computer_id @computer_id end |
#current_support_level ⇒ Object
Returns the value of attribute current_support_level.
4 5 6 |
# File 'lib/sysaid/ticket.rb', line 4 def current_support_level @current_support_level end |
#cust_int1 ⇒ Object
Returns the value of attribute cust_int1.
4 5 6 |
# File 'lib/sysaid/ticket.rb', line 4 def cust_int1 @cust_int1 end |
#cust_int2 ⇒ Object
Returns the value of attribute cust_int2.
4 5 6 |
# File 'lib/sysaid/ticket.rb', line 4 def cust_int2 @cust_int2 end |
#cust_list1 ⇒ Object
Returns the value of attribute cust_list1.
4 5 6 |
# File 'lib/sysaid/ticket.rb', line 4 def cust_list1 @cust_list1 end |
#cust_list2 ⇒ Object
Returns the value of attribute cust_list2.
4 5 6 |
# File 'lib/sysaid/ticket.rb', line 4 def cust_list2 @cust_list2 end |
#cust_notes ⇒ Object
Returns the value of attribute cust_notes.
4 5 6 |
# File 'lib/sysaid/ticket.rb', line 4 def cust_notes @cust_notes end |
#cust_text1 ⇒ Object
Returns the value of attribute cust_text1.
4 5 6 |
# File 'lib/sysaid/ticket.rb', line 4 def cust_text1 @cust_text1 end |
#cust_text2 ⇒ Object
Returns the value of attribute cust_text2.
4 5 6 |
# File 'lib/sysaid/ticket.rb', line 4 def cust_text2 @cust_text2 end |
#description ⇒ Object
Returns the value of attribute description.
4 5 6 |
# File 'lib/sysaid/ticket.rb', line 4 def description @description end |
#email_account ⇒ Object
Returns the value of attribute email_account.
4 5 6 |
# File 'lib/sysaid/ticket.rb', line 4 def email_account @email_account end |
#escalation ⇒ Object
Returns the value of attribute escalation.
4 5 6 |
# File 'lib/sysaid/ticket.rb', line 4 def escalation @escalation end |
#followup_text ⇒ Object
Returns the value of attribute followup_text.
4 5 6 |
# File 'lib/sysaid/ticket.rb', line 4 def followup_text @followup_text end |
#id ⇒ Object
Returns the value of attribute id.
4 5 6 |
# File 'lib/sysaid/ticket.rb', line 4 def id @id end |
#impact ⇒ Object
Returns the value of attribute impact.
4 5 6 |
# File 'lib/sysaid/ticket.rb', line 4 def impact @impact end |
#insert_time ⇒ Object
Returns the value of attribute insert_time.
4 5 6 |
# File 'lib/sysaid/ticket.rb', line 4 def insert_time @insert_time end |
#location ⇒ Object
Returns the value of attribute location.
4 5 6 |
# File 'lib/sysaid/ticket.rb', line 4 def location @location end |
#max_support_level ⇒ Object
Returns the value of attribute max_support_level.
4 5 6 |
# File 'lib/sysaid/ticket.rb', line 4 def max_support_level @max_support_level end |
#notes ⇒ Object
Returns the value of attribute notes.
4 5 6 |
# File 'lib/sysaid/ticket.rb', line 4 def notes @notes end |
#parent_link ⇒ Object
Returns the value of attribute parent_link.
4 5 6 |
# File 'lib/sysaid/ticket.rb', line 4 def parent_link @parent_link end |
#priority ⇒ Object
Returns the value of attribute priority.
4 5 6 |
# File 'lib/sysaid/ticket.rb', line 4 def priority @priority end |
#project_id ⇒ Object
Returns the value of attribute project_id.
4 5 6 |
# File 'lib/sysaid/ticket.rb', line 4 def project_id @project_id end |
#reopen_counter ⇒ Object
Returns the value of attribute reopen_counter.
4 5 6 |
# File 'lib/sysaid/ticket.rb', line 4 def reopen_counter @reopen_counter end |
#request_user ⇒ Object
Returns the value of attribute request_user.
4 5 6 |
# File 'lib/sysaid/ticket.rb', line 4 def request_user @request_user end |
#resolution ⇒ Object
Returns the value of attribute resolution.
4 5 6 |
# File 'lib/sysaid/ticket.rb', line 4 def resolution @resolution end |
#solution ⇒ Object
Returns the value of attribute solution.
4 5 6 |
# File 'lib/sysaid/ticket.rb', line 4 def solution @solution end |
#source ⇒ Object
Returns the value of attribute source.
4 5 6 |
# File 'lib/sysaid/ticket.rb', line 4 def source @source end |
#sr_sub_type ⇒ Object
Returns the value of attribute sr_sub_type.
4 5 6 |
# File 'lib/sysaid/ticket.rb', line 4 def sr_sub_type @sr_sub_type end |
#sr_type ⇒ Object
Returns the value of attribute sr_type.
4 5 6 |
# File 'lib/sysaid/ticket.rb', line 4 def sr_type @sr_type end |
#status ⇒ Object
Returns the value of attribute status.
4 5 6 |
# File 'lib/sysaid/ticket.rb', line 4 def status @status end |
#sub_category ⇒ Object
Returns the value of attribute sub_category.
4 5 6 |
# File 'lib/sysaid/ticket.rb', line 4 def sub_category @sub_category end |
#submit_user ⇒ Object
Returns the value of attribute submit_user.
4 5 6 |
# File 'lib/sysaid/ticket.rb', line 4 def submit_user @submit_user end |
#success_rating ⇒ Object
Returns the value of attribute success_rating.
4 5 6 |
# File 'lib/sysaid/ticket.rb', line 4 def @success_rating end |
#task_id ⇒ Object
Returns the value of attribute task_id.
4 5 6 |
# File 'lib/sysaid/ticket.rb', line 4 def task_id @task_id end |
#third_level_category ⇒ Object
Returns the value of attribute third_level_category.
4 5 6 |
# File 'lib/sysaid/ticket.rb', line 4 def third_level_category @third_level_category end |
#title ⇒ Object
Returns the value of attribute title.
4 5 6 |
# File 'lib/sysaid/ticket.rb', line 4 def title @title end |
#update_time ⇒ Object
Returns the value of attribute update_time.
4 5 6 |
# File 'lib/sysaid/ticket.rb', line 4 def update_time @update_time end |
#update_user ⇒ Object
Returns the value of attribute update_user.
4 5 6 |
# File 'lib/sysaid/ticket.rb', line 4 def update_user @update_user end |
#urgency ⇒ Object
Returns the value of attribute urgency.
4 5 6 |
# File 'lib/sysaid/ticket.rb', line 4 def urgency @urgency end |
#user_manager ⇒ Object
Returns the value of attribute user_manager.
4 5 6 |
# File 'lib/sysaid/ticket.rb', line 4 def user_manager @user_manager end |
#version ⇒ Object
Returns the value of attribute version.
4 5 6 |
# File 'lib/sysaid/ticket.rb', line 4 def version @version end |
#workaround ⇒ Object
Returns the value of attribute workaround.
4 5 6 |
# File 'lib/sysaid/ticket.rb', line 4 def workaround @workaround end |
Class Method Details
Instance Method Details
#delete ⇒ Object
Deletes a ticket from the SysAid server
No return value as SysAid’s ‘delete’ call returns void. No idea why.
Example:
>> ticket_object.delete
=> true
66 67 68 |
# File 'lib/sysaid/ticket.rb', line 66 def delete SysAid.client.call(:delete, message: to_xml(false)) end |
#refresh ⇒ Object
Loads the latest ticket information from the SysAid server
29 30 31 32 33 34 35 36 37 38 |
# File 'lib/sysaid/ticket.rb', line 29 def refresh response = SysAid.client.call(:load_by_string_id, message: to_xml) if response.to_hash[:load_by_string_id_response][:return] set_self_from_response(response.to_hash[:load_by_string_id_response][:return]) return true end return false end |
#save ⇒ Object
Saves a ticket back to the SysAid server
Example:
>> ticket_object.save
=> true
45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/sysaid/ticket.rb', line 45 def save if SysAid.logged_in? == false raise "You must log in before creating or saving a ticket." end # Save it via the SOAP API response = SysAid.client.call(:save, message: to_xml(false)) if response.to_hash[:save_response][:return] return true else return false end end |