intacctrb 0.5.1 → 0.5.2
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/ap_payment.rb +23 -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: 91d680b66aff9543c9aba09e0b1e6a77e29b5891
|
4
|
+
data.tar.gz: c6b10cc66d8e9162572140b03cdd2cd613de1fda
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7deff2d0b8f5ac3e835f3292dc14ec34a43b81ba80843a10ddf1291fb405d1631505a357a42350a1cb476f8ef3377cbd94a2f107745e2cad4b22d9f6ab7e0ad1
|
7
|
+
data.tar.gz: bb6095bc147643c4345a1a75d5d3c7c9ad66581c0ad9c0bd21da6a4341c74f8455307a329c3297bab1db10f0cc3cc9f91d49535ceda21aeb7e6a80fbbd37dd24
|
data/Gemfile.lock
CHANGED
data/lib/intacctrb/ap_payment.rb
CHANGED
@@ -21,6 +21,26 @@ module IntacctRB
|
|
21
21
|
object.intacct_id
|
22
22
|
end
|
23
23
|
|
24
|
+
def update
|
25
|
+
raise 'You must pass an id to update an ap payment' unless object.intacct_id.present?
|
26
|
+
|
27
|
+
send_xml('update') do |xml|
|
28
|
+
xml.function(controlid: "f1") {
|
29
|
+
xml.update {
|
30
|
+
xml.appayment(key: object.intacct_id) {
|
31
|
+
ap_payment_xml xml
|
32
|
+
}
|
33
|
+
}
|
34
|
+
}
|
35
|
+
end
|
36
|
+
|
37
|
+
if !successful?
|
38
|
+
raise(response.at('//error//description2'))
|
39
|
+
end
|
40
|
+
|
41
|
+
object.intacct_id
|
42
|
+
end
|
43
|
+
|
24
44
|
def reverse
|
25
45
|
return false unless object.id.present?
|
26
46
|
|
@@ -132,9 +152,9 @@ module IntacctRB
|
|
132
152
|
end
|
133
153
|
|
134
154
|
def ap_payment_xml xml
|
135
|
-
xml.key object.intacct_id
|
136
|
-
xml.bankaccountid object.bank_account_id
|
137
|
-
xml.chargecardid object.charge_card_id
|
155
|
+
xml.key object.intacct_id unless object.intacct_id.blank?
|
156
|
+
xml.bankaccountid object.bank_account_id unless object.bank_account_id.blank?
|
157
|
+
xml.chargecardid object.charge_card_id unless object.charge_card_id.blank?
|
138
158
|
xml.vendorid object.vendor_id
|
139
159
|
xml.memo object.memo
|
140
160
|
xml.paymentmethod object.payment_method
|
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.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Hale
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-07-
|
11
|
+
date: 2017-07-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|