sysaid 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sysaid/ticket.rb +79 -72
- data/lib/sysaid/user.rb +30 -30
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4fe7162cf00afdf721ab97712445a400f9ddf4e
|
4
|
+
data.tar.gz: ab0ee5cd4a41d955f02f69d06d6ecc8a9ebe0820
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b9affe8dea28fa3c0938e30cfc8a8f679c3efba784399e4e02e16058a2073d680a5b7e2389dd3d778580c00adcf92afb3c9e48c1427c103675384024e3eb2ae
|
7
|
+
data.tar.gz: 887e542faa903d7e6bdc7559d0e12762097297aebca0a5f3610897162207579ead0e439589753779c4554c87197a05b4022bfeefe112db2b7b4d87826f1981e6
|
data/lib/sysaid/ticket.rb
CHANGED
@@ -1,17 +1,18 @@
|
|
1
1
|
require 'date'
|
2
2
|
|
3
3
|
class SysAid::Ticket
|
4
|
-
attr_accessor :agreement, :
|
5
|
-
:
|
6
|
-
:
|
7
|
-
:status, :
|
8
|
-
:
|
9
|
-
:
|
10
|
-
:
|
4
|
+
attr_accessor :agreement, :assign_counter, :assigned_to, :ciid, :category, :current_support_level, :cust_int1,
|
5
|
+
:cust_int2, :cust_list1, :cust_list2, :description, :escalation, :id, :location, :max_support_level,
|
6
|
+
:parent_link, :priority, :project_id, :reopen_counter, :request_user, :source, :sr_sub_type, :sr_type,
|
7
|
+
:status, :sub_category, :submit_user, :success_rating, :task_id, :title, :urgency, :version, :archive,
|
8
|
+
:assigned_group, :cc, :change_category, :close_time, :closure_information, :computer_id,
|
9
|
+
:cust_notes, :cust_text1, :cust_text2, :impact, :notes, :resolution, :solution, :third_level_category,
|
10
|
+
:update_time, :update_user, :user_manager, :workaround, :insert_time, :followup_text, :email_account
|
11
11
|
|
12
12
|
def initialize
|
13
|
-
self.
|
14
|
-
self.
|
13
|
+
self.close_time = Date.new
|
14
|
+
self.insert_time = Date.new
|
15
|
+
self.update_time = Date.new
|
15
16
|
end
|
16
17
|
|
17
18
|
def self.find_by_id(ticket_id)
|
@@ -75,57 +76,56 @@ class SysAid::Ticket
|
|
75
76
|
xml = builder.apiSysObj('xsi:type' => "tns:apiServiceRequest") { |b|
|
76
77
|
b.agreement(self.agreement, 'xsi:type' => 'xsd:int')
|
77
78
|
b.archive(self.archive, 'xsi:type' => 'xsd:boolean')
|
78
|
-
b.assignCounter(self.
|
79
|
-
b.assignedGroup(self.
|
80
|
-
b.assignedTo(self.
|
79
|
+
b.assignCounter(self.assign_counter, 'xsi:type' => 'xsd:int')
|
80
|
+
b.assignedGroup(self.assigned_group, 'xsi:type' => 'xsd:string')
|
81
|
+
b.assignedTo(self.assigned_to, 'xsi:type' => 'xsd:string')
|
81
82
|
b.CIId(self.ciid, 'xsi:type' => 'xsd:int')
|
82
83
|
b.category(self.category, 'xsi:type' => 'xsd:string')
|
83
84
|
b.cc(self.cc, 'xsi:type' => 'xsd:string')
|
84
|
-
b.changeCategory(self.
|
85
|
-
b.closeTime(self.
|
86
|
-
b.closureInformation(self.
|
87
|
-
b.computerID(self.
|
88
|
-
b.currentSupportLevel(self.
|
89
|
-
b.custInt1(self.
|
90
|
-
b.custInt2(self.
|
91
|
-
b.custList1(self.
|
92
|
-
b.custList2(self.
|
93
|
-
b.custNotes(self.
|
94
|
-
b.custText1(self.
|
95
|
-
b.custText2(self.
|
85
|
+
b.changeCategory(self.change_category, 'xsi:type' => 'xsd:int')
|
86
|
+
b.closeTime(self.close_time.rfc3339, 'xsi:type' => 'xsd:dateTime')
|
87
|
+
b.closureInformation(self.closure_information, 'xsi:type' => 'xsd:int')
|
88
|
+
b.computerID(self.computer_id, 'xsi:type' => 'xsd:string')
|
89
|
+
b.currentSupportLevel(self.current_support_level, 'xsi:type' => 'xsd:int')
|
90
|
+
b.custInt1(self.cust_int1, 'xsi:type' => 'xsd:int')
|
91
|
+
b.custInt2(self.cust_int2, 'xsi:type' => 'xsd:int')
|
92
|
+
b.custList1(self.cust_list1, 'xsi:type' => 'xsd:int')
|
93
|
+
b.custList2(self.cust_list2, 'xsi:type' => 'xsd:int')
|
94
|
+
b.custNotes(self.cust_notes, 'xsi:type' => 'xsd:string')
|
95
|
+
b.custText1(self.cust_text1, 'xsi:type' => 'xsd:string')
|
96
|
+
b.custText2(self.cust_text2, 'xsi:type' => 'xsd:string')
|
96
97
|
b.customDateFields
|
97
98
|
#b.customFields
|
98
99
|
b.description(self.description, 'xsi:type' => 'xsd:string')
|
99
|
-
|
100
|
+
b.emailAccount(self.email_account, 'xsi:type' => 'xsd:string')
|
100
101
|
b.escalation(self.escalation, 'xsi:type' => 'xsd:int')
|
101
|
-
|
102
|
+
b.followupText(self.followup_text, 'xsi:type' => 'xsd:string')
|
102
103
|
b.id(self.id, 'xsi:type' => 'xsd:int')
|
103
104
|
b.impact(self.impact, 'xsi:type' => 'xsd:int')
|
104
|
-
|
105
|
-
# 2012-06-13T17:42:03.053Z</insertTime>
|
105
|
+
b.insertTime(self.insert_time.rfc3339, 'xsi:type' => 'xsd:dateTime')
|
106
106
|
b.location(self.location, 'xsi:type' => 'xsd:int')
|
107
|
-
b.maxSupportLevel(self.
|
107
|
+
b.maxSupportLevel(self.max_support_level, 'xsi:type' => 'xsd:int')
|
108
108
|
b.notes(self.notes, 'xsi:type' => 'xsd:string')
|
109
|
-
b.parentLink(self.
|
109
|
+
b.parentLink(self.parent_link, 'xsi:type' => 'xsd:int')
|
110
110
|
b.priority(self.priority, 'xsi:type' => 'xsd:int')
|
111
|
-
b.projectID(self.
|
112
|
-
b.reopenCounter(self.
|
113
|
-
b.requestUser(self.
|
111
|
+
b.projectID(self.project_id, 'xsi:type' => 'xsd:int')
|
112
|
+
b.reopenCounter(self.reopen_counter, 'xsi:type' => 'xsd:int')
|
113
|
+
b.requestUser(self.request_user, 'xsi:type' => 'xsd:string')
|
114
114
|
b.resolution(self.resolution, 'xsi:type' => 'xsd:string')
|
115
115
|
b.solution(self.solution, 'xsi:type' => 'xsd:string')
|
116
116
|
b.source(self.source, 'xsi:type' => 'xsd:int')
|
117
|
-
b.srSubType(self.
|
118
|
-
b.srType(self.
|
117
|
+
b.srSubType(self.sr_sub_type, 'xsi:type' => 'xsd:int')
|
118
|
+
b.srType(self.sr_type, 'xsi:type' => 'xsd:int')
|
119
119
|
b.status(self.status, 'xsi:type' => 'xsd:int')
|
120
|
-
b.subCategory(self.
|
121
|
-
b.successRating(self.
|
122
|
-
b.taskID(self.
|
123
|
-
b.thirdLevelCategory(self.
|
120
|
+
b.subCategory(self.sub_category, 'xsi:type' => 'xsd:string')
|
121
|
+
b.successRating(self.success_rating, 'xsi:type' => 'xsd:int')
|
122
|
+
b.taskID(self.task_id, 'xsi:type' => 'xsd:int')
|
123
|
+
b.thirdLevelCategory(self.third_level_category, 'xsi:type' => 'xsd:string')
|
124
124
|
b.title(self.title, 'xsi:type' => 'xsd:string')
|
125
|
-
b.updateTime(self.
|
126
|
-
b.updateUser(self.
|
125
|
+
b.updateTime(self.update_time.rfc3339, 'xsi:type' => 'xsd:dateTime')
|
126
|
+
b.updateUser(self.update_user, 'xsi:type' => 'xsd:string')
|
127
127
|
b.urgency(self.urgency, 'xsi:type' => 'xsd:int')
|
128
|
-
b.userManager(self.
|
128
|
+
b.userManager(self.user_manager, 'xsi:type' => 'xsd:string')
|
129
129
|
b.version(self.version, 'xsi:type' => 'xsd:int')
|
130
130
|
b.workaround(self.workaround, 'xsi:type' => 'xsd:string')
|
131
131
|
}
|
@@ -136,53 +136,60 @@ class SysAid::Ticket
|
|
136
136
|
|
137
137
|
# Update instance variables to match what is in response
|
138
138
|
def set_self_from_response(response)
|
139
|
+
pp "---"
|
140
|
+
pp response
|
141
|
+
pp "---"
|
142
|
+
|
139
143
|
self.agreement = response[:agreement]
|
140
144
|
self.archive = response[:archive]
|
141
|
-
self.
|
142
|
-
self.
|
143
|
-
self.
|
144
|
-
self.ciid = response[:
|
145
|
+
self.assign_counter = response[:assign_counter]
|
146
|
+
self.assigned_group = response[:assign_group]
|
147
|
+
self.assigned_to = response[:assign_to]
|
148
|
+
self.ciid = response[:ci_id]
|
145
149
|
self.category = response[:category]
|
146
150
|
self.cc = response[:cc]
|
147
|
-
self.
|
148
|
-
self.
|
149
|
-
self.
|
150
|
-
self.
|
151
|
-
self.
|
152
|
-
self.
|
153
|
-
self.
|
154
|
-
self.
|
155
|
-
self.
|
156
|
-
self.
|
157
|
-
self.
|
158
|
-
self.
|
151
|
+
self.change_category = response[:change_category]
|
152
|
+
self.close_time = response[:close_time]
|
153
|
+
self.closure_information = response[:closure_information]
|
154
|
+
self.computer_id = response[:computer_id]
|
155
|
+
self.current_support_level = response[:current_support_level]
|
156
|
+
self.cust_int1 = response[:cust_int1]
|
157
|
+
self.cust_int2 = response[:cust_int2]
|
158
|
+
self.cust_list1 = response[:cust_list1]
|
159
|
+
self.cust_list2 = response[:cust_list2]
|
160
|
+
self.cust_notes = response[:cust_notes]
|
161
|
+
self.cust_text1 = response[:cust_text1]
|
162
|
+
self.cust_text2 = response[:cust_text2]
|
159
163
|
self.description = response[:description]
|
164
|
+
self.email_account = response[:email_account]
|
160
165
|
self.escalation = response[:escalation]
|
166
|
+
self.followup_text = response[:followup_text]
|
161
167
|
self.id = response[:id]
|
162
168
|
self.impact = response[:impact]
|
169
|
+
self.insert_time = response[:insert_time]
|
163
170
|
self.location = response[:location]
|
164
|
-
self.
|
171
|
+
self.max_support_level = response[:max_support_level]
|
165
172
|
self.notes = response[:notes]
|
166
|
-
self.
|
173
|
+
self.parent_link = response[:parent_link]
|
167
174
|
self.priority = response[:priority]
|
168
|
-
self.
|
169
|
-
self.
|
170
|
-
self.
|
175
|
+
self.project_id = response[:project_id]
|
176
|
+
self.reopen_counter = response[:reopen_counter]
|
177
|
+
self.request_user = response[:request_user]
|
171
178
|
self.resolution = response[:resolution]
|
172
179
|
self.solution = response[:solution]
|
173
180
|
self.source = response[:source]
|
174
|
-
self.
|
175
|
-
self.
|
181
|
+
self.sr_sub_type = response[:sr_sub_type]
|
182
|
+
self.sr_type = response[:sr_type]
|
176
183
|
self.status = response[:status]
|
177
|
-
self.
|
178
|
-
self.
|
179
|
-
self.
|
180
|
-
self.
|
184
|
+
self.sub_category = response[:sub_category]
|
185
|
+
self.success_rating = response[:success_rating]
|
186
|
+
self.task_id = response[:task_id]
|
187
|
+
self.third_level_category = response[:third_level_category]
|
181
188
|
self.title = response[:title]
|
182
|
-
self.
|
183
|
-
self.
|
189
|
+
self.update_time = response[:update_time]
|
190
|
+
self.update_user = response[:update_user]
|
184
191
|
self.urgency = response[:urgency]
|
185
|
-
self.
|
192
|
+
self.user_manager = response[:user_manager]
|
186
193
|
self.version = response[:version]
|
187
194
|
self.workaround = response[:workaround]
|
188
195
|
end
|
data/lib/sysaid/user.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
class SysAid::User
|
2
2
|
attr_accessor :username, :display_name, :email, :phone, :first_name, :last_name, :admin, :agreement, :building,
|
3
|
-
:car_number, :cellphone, :company, :cubic, :
|
4
|
-
:
|
5
|
-
:manager, :notes, :sms, :
|
3
|
+
:car_number, :cellphone, :company, :cubic, :cust_int1, :cust_int2, :cust_list1, :cust_list2, :cust_notes,
|
4
|
+
:cust_text1, :cust_text2, :department, :disable, :email_notifications, :enable_login_to_eup, :floor, :location,
|
5
|
+
:manager, :notes, :sms, :user_manager_name, :login_domain, :login_user, :secondary_email
|
6
6
|
|
7
7
|
# Creates a SysAid::User object
|
8
8
|
#
|
@@ -82,33 +82,33 @@ class SysAid::User
|
|
82
82
|
b.cellphone(self.cellphone, 'xsi:type' => 'xsd:string')
|
83
83
|
b.company(self.company, 'xsi:type' => 'xsd:int')
|
84
84
|
b.cubic(self.cubic, 'xsi:type' => 'xsd:string')
|
85
|
-
b.custInt1(self.
|
86
|
-
b.custInt2(self.
|
87
|
-
b.custList1(self.
|
88
|
-
b.custList2(self.
|
89
|
-
b.custNotes(self.
|
90
|
-
b.custText1(self.
|
91
|
-
b.custText2(self.
|
85
|
+
b.custInt1(self.cust_int1, 'xsi:type' => 'xsd:int')
|
86
|
+
b.custInt2(self.cust_int2, 'xsi:type' => 'xsd:int')
|
87
|
+
b.custList1(self.cust_list1, 'xsi:type' => 'xsd:int')
|
88
|
+
b.custList2(self.cust_list2, 'xsi:type' => 'xsd:int')
|
89
|
+
b.custNotes(self.cust_notes, 'xsi:type' => 'xsd:string')
|
90
|
+
b.custText1(self.cust_text1, 'xsi:type' => 'xsd:string')
|
91
|
+
b.custText2(self.cust_text2, 'xsi:type' => 'xsd:string')
|
92
92
|
b.customDateFields
|
93
93
|
b.customFields
|
94
94
|
b.department(self.department, 'xsi:type' => 'xsd:int')
|
95
95
|
b.disable(self.disable, 'xsi:type' => 'xsd:boolean')
|
96
96
|
b.displayName(self.display_name, 'xsi:type' => 'xsd:string')
|
97
97
|
b.email(self.email, 'xsi:type' => 'xsd:string')
|
98
|
-
b.emailNotifications(self.
|
99
|
-
b.enableLoginToEup(self.
|
98
|
+
b.emailNotifications(self.email_notifications, 'xsi:type' => 'xsd:boolean')
|
99
|
+
b.enableLoginToEup(self.enable_login_to_eup, 'xsi:type' => 'xsd:boolean')
|
100
100
|
b.firstName(self.first_name, 'xsi:type' => 'xsd:string')
|
101
101
|
b.floor(self.floor, 'xsi:type' => 'xsd:string')
|
102
102
|
b.lastName(self.last_name, 'xsi:type' => 'xsd:string')
|
103
103
|
b.location(self.location, 'xsi:type' => 'xsd:int')
|
104
|
-
b.loginDomain(self.
|
105
|
-
b.loginUser(self.
|
104
|
+
b.loginDomain(self.login_domain, 'xsi:type' => 'xsd:string')
|
105
|
+
b.loginUser(self.login_user, 'xsi:type' => 'xsd:string')
|
106
106
|
b.manager(self.manager, 'xsi:type' => 'xsd:boolean')
|
107
107
|
b.notes(self.notes, 'xsi:type' => 'xsd:string')
|
108
108
|
b.phone(self.phone, 'xsi:type' => 'xsd:string')
|
109
|
-
b.secondaryEmail(self.
|
109
|
+
b.secondaryEmail(self.secondary_email, 'xsi:type' => 'xsd:string')
|
110
110
|
b.sms(self.sms, 'xsi:type' => 'xsd:string')
|
111
|
-
b.userManagerName(self.
|
111
|
+
b.userManagerName(self.user_manager_name, 'xsi:type' => 'xsd:string')
|
112
112
|
b.userName(self.username, 'xsi:type' => 'xsd:string')
|
113
113
|
}
|
114
114
|
xml = builder.id(self.username) if include_id
|
@@ -127,29 +127,29 @@ class SysAid::User
|
|
127
127
|
self.admin = response[:admin]
|
128
128
|
self.agreement = response[:agreement]
|
129
129
|
self.building = response[:building]
|
130
|
-
self.car_number = response[:
|
130
|
+
self.car_number = response[:car_number]
|
131
131
|
self.cellphone = response[:cellphone]
|
132
132
|
self.company = response[:company]
|
133
133
|
self.cubic = response[:cubic]
|
134
|
-
self.
|
135
|
-
self.
|
136
|
-
self.
|
137
|
-
self.
|
138
|
-
self.
|
139
|
-
self.
|
140
|
-
self.
|
134
|
+
self.cust_int1 = response[:cust_int1]
|
135
|
+
self.cust_int2 = response[:cust_int2]
|
136
|
+
self.cust_list1 = response[:cust_list1]
|
137
|
+
self.cust_list2 = response[:cust_list2]
|
138
|
+
self.cust_notes = response[:cust_notes]
|
139
|
+
self.cust_text1 = response[:cust_text1]
|
140
|
+
self.cust_text2 = response[:cust_text2]
|
141
141
|
self.department = response[:department]
|
142
142
|
self.disable = response[:disable]
|
143
|
-
self.
|
144
|
-
self.
|
143
|
+
self.email_notifications = response[:email_notifications]
|
144
|
+
self.enable_login_to_eup = response[:enableLoginToEup]
|
145
145
|
self.floor = response[:floor]
|
146
146
|
self.location = response[:location]
|
147
147
|
self.manager = response[:manager]
|
148
148
|
self.notes = response[:notes]
|
149
149
|
self.sms = response[:sms]
|
150
|
-
self.
|
151
|
-
self.
|
152
|
-
self.
|
153
|
-
self.
|
150
|
+
self.user_manager_name = response[:userManagerName]
|
151
|
+
self.login_domain = response[:login_domain]
|
152
|
+
self.login_user = response[:login_user]
|
153
|
+
self.secondary_email = response[:secondaryEmail]
|
154
154
|
end
|
155
155
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sysaid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christopher Thielen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-08-
|
11
|
+
date: 2013-08-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: savon
|