intacctrb 0.5.7 → 0.5.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/intacctrb/employee.rb +9 -9
- data/lib/intacctrb/journal_entry.rb +2 -2
- data/lib/intacctrb/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 328f00d0ecf540d300b82cd5af43bed2799e5569
|
4
|
+
data.tar.gz: 7b771204fad2a1f723a4b76602ff535b0c0ebadd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f4fb958e8ff0ae1a2520be02338a94f5a4cbf79c6c5b8f8bf0ca652ed1485145c62076ad36c235525b49ddbdce32bd605460e640e0a31b1756ecf9a5239a599
|
7
|
+
data.tar.gz: ad4845178f7973d379215d69d2e073471bf9cd1f56f3bbd3e945ff01ffad3a092d7dc05870d3274f5a71cdb22007790c8406d06e8e764074c3f2cb05c206d106
|
data/Gemfile.lock
CHANGED
data/lib/intacctrb/employee.rb
CHANGED
@@ -12,19 +12,19 @@ module IntacctRB
|
|
12
12
|
successful?
|
13
13
|
end
|
14
14
|
|
15
|
-
def get
|
16
|
-
#return false unless object.intacct_system_id.present?
|
15
|
+
def get(options = {})
|
16
|
+
# return false unless object.intacct_system_id.present?
|
17
17
|
|
18
|
-
fields = [
|
18
|
+
options[:fields] = [
|
19
19
|
:employeeid,
|
20
|
-
:
|
21
|
-
] if fields.
|
20
|
+
:contactname
|
21
|
+
] if options[:fields].nil?
|
22
22
|
|
23
23
|
send_xml('get') do |xml|
|
24
24
|
xml.function(controlid: "f4") {
|
25
25
|
xml.read {
|
26
26
|
xml.object 'EMPLOYEE'
|
27
|
-
xml.keys object.intacct_id
|
27
|
+
xml.keys object.try(:intacct_id) || options[:intacct_id]
|
28
28
|
xml.fields '*'
|
29
29
|
}
|
30
30
|
}
|
@@ -32,8 +32,8 @@ module IntacctRB
|
|
32
32
|
|
33
33
|
if successful?
|
34
34
|
@data = OpenStruct.new({
|
35
|
-
id: response.at("//
|
36
|
-
name: response.at("//
|
35
|
+
id: response.at("//EMPLOYEE/RECORDNO").content,
|
36
|
+
name: response.at("//EMPLOYEE/PERSONALINFO/CONTACTNAME").content
|
37
37
|
})
|
38
38
|
end
|
39
39
|
|
@@ -95,7 +95,7 @@ module IntacctRB
|
|
95
95
|
|
96
96
|
@response = send_xml('delete') do |xml|
|
97
97
|
xml.function(controlid: "1") {
|
98
|
-
xml.
|
98
|
+
xml.delete_employee(employeeid: intacct_system_id)
|
99
99
|
}
|
100
100
|
end
|
101
101
|
|
@@ -51,7 +51,7 @@ module IntacctRB
|
|
51
51
|
xml.query options[:filter]
|
52
52
|
if options[:fields]
|
53
53
|
xml.fields {
|
54
|
-
fields.each do |field|
|
54
|
+
options[:fields].each do |field|
|
55
55
|
xml.field field.to_s
|
56
56
|
end
|
57
57
|
}
|
@@ -87,7 +87,7 @@ module IntacctRB
|
|
87
87
|
xml.keys object.try(:intacct_id) || options[:intacct_id]
|
88
88
|
if options[:fields]
|
89
89
|
xml.fields {
|
90
|
-
fields.each do |field|
|
90
|
+
options[:fields].each do |field|
|
91
91
|
xml.field field.to_s
|
92
92
|
end
|
93
93
|
}
|
data/lib/intacctrb/version.rb
CHANGED