intacctrb 0.3pre → 0.3
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/vendor.rb +28 -28
- data/lib/intacctrb/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c47eb57b4b19041d7132159c969818485fd91dd1
|
4
|
+
data.tar.gz: ae177589589399ca12ad4b20fb3baa97d1b8c32f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: add483ca39dbf97f392659ea0702e07191c7e3c582f079b4cc6514dd0c229f125571d4fe82c27dd49b719ad450a17375c2b10e6b715da1f95e3814df2fa2a43c
|
7
|
+
data.tar.gz: 8890f4cbe92c9a449814ae4fe8a3a7e63c403dde6c67512ab74a90206bee8481c9d479b3c61623323324228231ef08b3336c6a978370af4f60ac6da825051b01
|
data/Gemfile.lock
CHANGED
data/lib/intacctrb/vendor.rb
CHANGED
@@ -2,19 +2,21 @@ module IntacctRB
|
|
2
2
|
class Vendor < IntacctRB::Base
|
3
3
|
def create
|
4
4
|
send_xml('create') do |xml|
|
5
|
-
xml.function(controlid: "
|
6
|
-
xml.
|
7
|
-
xml.
|
8
|
-
|
5
|
+
xml.function(controlid: "f1") {
|
6
|
+
xml.create {
|
7
|
+
xml.vendor {
|
8
|
+
vendor_xml xml
|
9
|
+
}
|
9
10
|
}
|
10
11
|
}
|
11
12
|
end
|
12
13
|
|
13
14
|
if !successful?
|
14
|
-
raise(response.at('//error//description2'))
|
15
|
+
raise(response.at('//error//description2'))
|
15
16
|
end
|
16
17
|
|
17
|
-
|
18
|
+
new_vendor = response.xpath('//result//data//vendor').first
|
19
|
+
new_vendor.at('VENDORID').content
|
18
20
|
end
|
19
21
|
|
20
22
|
def update updated_vendor = false
|
@@ -87,32 +89,30 @@ module IntacctRB
|
|
87
89
|
def vendor_xml xml
|
88
90
|
xml.name "#{object.company_name.present? ? object.company_name : object.full_name}"
|
89
91
|
#[todo] - Custom
|
90
|
-
xml.vendtype "Appraiser"
|
92
|
+
# xml.vendtype "Appraiser"
|
91
93
|
xml.taxid object.tax_id
|
92
94
|
xml.billingtype "balanceforward"
|
93
95
|
xml.status "active"
|
94
96
|
xml.vendoraccountno object.vendor_account_number
|
95
|
-
xml.
|
96
|
-
xml.
|
97
|
-
xml.
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
xml.
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
end
|
115
|
-
}
|
97
|
+
xml.paymethodkey object.payment_method
|
98
|
+
xml.displaycontact {
|
99
|
+
xml.contactname object.company_name
|
100
|
+
xml.printas object.company_name
|
101
|
+
xml.companyname object.company_name
|
102
|
+
xml.firstname object.first_name
|
103
|
+
xml.lastname object.last_name
|
104
|
+
xml.phone1 object.business_phone
|
105
|
+
xml.cellphone object.cell_phone
|
106
|
+
xml.email1 object.email
|
107
|
+
if object.billing_address.present?
|
108
|
+
xml.mailaddress {
|
109
|
+
xml.address1 object.billing_address.address1
|
110
|
+
xml.address2 object.billing_address.address2
|
111
|
+
xml.city object.billing_address.city
|
112
|
+
xml.state object.billing_address.state
|
113
|
+
xml.zip object.billing_address.zipcode
|
114
|
+
}
|
115
|
+
end
|
116
116
|
}
|
117
117
|
if object.ach_routing_number.present?
|
118
118
|
xml.achenabled "#{object.ach_routing_number.present? ? "true" : "false"}"
|
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.
|
4
|
+
version: '0.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: 2017-01-
|
11
|
+
date: 2017-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -203,9 +203,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
203
203
|
version: '0'
|
204
204
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
205
205
|
requirements:
|
206
|
-
- - "
|
206
|
+
- - ">="
|
207
207
|
- !ruby/object:Gem::Version
|
208
|
-
version:
|
208
|
+
version: '0'
|
209
209
|
requirements: []
|
210
210
|
rubyforge_project:
|
211
211
|
rubygems_version: 2.5.1
|