intacctrb 0.6.2 → 0.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/intacctrb/base.rb +13 -0
- data/lib/intacctrb/contact.rb +3 -3
- data/lib/intacctrb/employee.rb +3 -3
- data/lib/intacctrb/journal_entry.rb +2 -3
- data/lib/intacctrb/version.rb +1 -1
- 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: 609eacac3273306972a5dcdfdb1235531eb25b78
|
|
4
|
+
data.tar.gz: a5a1b1b36acdd3c8cf02380da4610bafc6dac57f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7b9642b1e6bedd8bed6b82327a8b783ca2fbdb7824dee7adcc5159d4a1dc9ce5b0c00e2454c26f19d72b5535101274785d48550b419320aff92862501eba9389
|
|
7
|
+
data.tar.gz: 89e8095c781198fbe4328a8ffccc4f621592e23304ec16cc7dd3926d27f83288414860384d63265ce975567075e8246c2e65f0808838f56118bc42a57d8e6caf
|
data/Gemfile.lock
CHANGED
data/lib/intacctrb/base.rb
CHANGED
|
@@ -90,6 +90,19 @@ module IntacctRB
|
|
|
90
90
|
end
|
|
91
91
|
end
|
|
92
92
|
|
|
93
|
+
def return_result(response)
|
|
94
|
+
if successful?
|
|
95
|
+
data = OpenStruct.new({result: true})
|
|
96
|
+
else
|
|
97
|
+
data = OpenStruct.new({result: false})
|
|
98
|
+
response.xpath("//result/errormessage/error").each do |error|
|
|
99
|
+
data.error_code = error.at("//errorno").content
|
|
100
|
+
data.error_description = error.at("//description2").content
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
data
|
|
104
|
+
end
|
|
105
|
+
|
|
93
106
|
%w(invoice bill vendor customer journal_entry).each do |type|
|
|
94
107
|
define_method "intacct_#{type}_prefix" do
|
|
95
108
|
IntacctRB.send("#{type}_prefix")
|
data/lib/intacctrb/contact.rb
CHANGED
|
@@ -9,7 +9,7 @@ module IntacctRB
|
|
|
9
9
|
}
|
|
10
10
|
end
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
return_result(response)
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
def get(options = {})
|
|
@@ -85,7 +85,7 @@ module IntacctRB
|
|
|
85
85
|
}
|
|
86
86
|
end
|
|
87
87
|
|
|
88
|
-
|
|
88
|
+
return_result(response)
|
|
89
89
|
end
|
|
90
90
|
|
|
91
91
|
def delete
|
|
@@ -97,7 +97,7 @@ module IntacctRB
|
|
|
97
97
|
}
|
|
98
98
|
end
|
|
99
99
|
|
|
100
|
-
|
|
100
|
+
return_result(response)
|
|
101
101
|
end
|
|
102
102
|
|
|
103
103
|
def contact_xml(xml, is_update = false)
|
data/lib/intacctrb/employee.rb
CHANGED
|
@@ -9,7 +9,7 @@ module IntacctRB
|
|
|
9
9
|
}
|
|
10
10
|
end
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
return_result(response)
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
def get(options = {})
|
|
@@ -87,7 +87,7 @@ module IntacctRB
|
|
|
87
87
|
}
|
|
88
88
|
end
|
|
89
89
|
|
|
90
|
-
|
|
90
|
+
return_result(response)
|
|
91
91
|
end
|
|
92
92
|
|
|
93
93
|
def delete
|
|
@@ -99,7 +99,7 @@ module IntacctRB
|
|
|
99
99
|
}
|
|
100
100
|
end
|
|
101
101
|
|
|
102
|
-
|
|
102
|
+
return_result(response)
|
|
103
103
|
end
|
|
104
104
|
|
|
105
105
|
def employee_xml xml
|
|
@@ -13,7 +13,7 @@ module IntacctRB
|
|
|
13
13
|
}
|
|
14
14
|
end
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
return_result(response)
|
|
17
17
|
end
|
|
18
18
|
|
|
19
19
|
def update
|
|
@@ -28,7 +28,7 @@ module IntacctRB
|
|
|
28
28
|
}
|
|
29
29
|
end
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
return_result(response)
|
|
32
32
|
end
|
|
33
33
|
|
|
34
34
|
# def delete
|
|
@@ -191,6 +191,5 @@ module IntacctRB
|
|
|
191
191
|
date
|
|
192
192
|
end
|
|
193
193
|
end
|
|
194
|
-
|
|
195
194
|
end
|
|
196
195
|
end
|
data/lib/intacctrb/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: intacctrb
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.6.
|
|
4
|
+
version: 0.6.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Matt Hale
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-01-
|
|
11
|
+
date: 2018-01-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: nokogiri
|