intacctrb 0.8 → 0.8.1
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/base.rb +1 -1
- data/lib/intacctrb/journal_entry.rb +22 -18
- data/lib/intacctrb/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 85d2a0530dd2439819c4affc9d598cf27f95cef62460fc9e78f98327741635c3
|
4
|
+
data.tar.gz: a8dac39c1c61d8f8bdcef1fa47eae8245d0a248ec8fdb5c6e6ea8d19c529daae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1043d711e9945cd3d59132800c59997f9d3c6c47ced936a5039e002746cf85905b77f8e512ed903bc5a0cc7c569b9c272128599fbcfed0666bb02da3470d420b
|
7
|
+
data.tar.gz: 4b7ecbd39d2b8c037b102e4236a8b36b6fa2466e34dcd8caa5ca9c598f9946d0afe243003fc6e6412790b1f32db37a980d94a1355c394edbe9d2d22f2ba7b595
|
data/Gemfile.lock
CHANGED
data/lib/intacctrb/base.rb
CHANGED
@@ -105,7 +105,7 @@ module IntacctRB
|
|
105
105
|
data = OpenStruct.new({result: true, intacct_id: object.intacct_id,
|
106
106
|
object: response, data: data})
|
107
107
|
else
|
108
|
-
data = OpenStruct.new({result: false})
|
108
|
+
data = OpenStruct.new({result: false, intacct_id: object.intacct_id})
|
109
109
|
data.errors = {}
|
110
110
|
response.xpath("//result/errormessage/error").each do |error|
|
111
111
|
data.errors << {
|
@@ -2,33 +2,37 @@ module IntacctRB
|
|
2
2
|
class JournalEntry < IntacctRB::Base
|
3
3
|
|
4
4
|
def create
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
5
|
+
if object.intacct_id.present?
|
6
|
+
return_error('You tried to create an object that already had an intacct_id')
|
7
|
+
else
|
8
|
+
send_xml('create') do |xml|
|
9
|
+
xml.function(controlid: "f1") {
|
10
|
+
xml.send("create") {
|
11
|
+
xml.glbatch {
|
12
|
+
je_xml xml
|
13
|
+
}
|
11
14
|
}
|
12
15
|
}
|
13
|
-
|
16
|
+
end
|
17
|
+
return_result(response)
|
14
18
|
end
|
15
|
-
|
16
|
-
return_result(response)
|
17
19
|
end
|
18
20
|
|
19
21
|
def update
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
22
|
+
unless object.intacct_id.present?
|
23
|
+
return_error('You tried to update an object without an intacct_id')
|
24
|
+
else
|
25
|
+
send_xml('update') do |xml|
|
26
|
+
xml.function(controlid: "f1") {
|
27
|
+
xml.send("update") {
|
28
|
+
xml.glbatch {
|
29
|
+
je_xml xml
|
30
|
+
}
|
26
31
|
}
|
27
32
|
}
|
28
|
-
|
33
|
+
end
|
34
|
+
return_result(response)
|
29
35
|
end
|
30
|
-
|
31
|
-
return_result(response)
|
32
36
|
end
|
33
37
|
|
34
38
|
# def delete
|
data/lib/intacctrb/version.rb
CHANGED