intacctrb 0.3pre → 0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b8ccb356ac2c6933b8dad65d7e8135345c321228
4
- data.tar.gz: 75032daf9956d8a9b8f1aa12a87fd965e4904cb3
3
+ metadata.gz: c47eb57b4b19041d7132159c969818485fd91dd1
4
+ data.tar.gz: ae177589589399ca12ad4b20fb3baa97d1b8c32f
5
5
  SHA512:
6
- metadata.gz: e6439c42ff5ba6be1732f5be37f9dabc40297feaa145b42d812f8f8e14f7d27c1b51f24628f32e889c70233ebb92305cd599c039e190d585dbdabfa67a288b9c
7
- data.tar.gz: 9d58bca5fd26d4e1458ff0f139cb3a6cc11fdd53b644f76ebcf22681c8036c9f5079a35fb8fdd57bcbbb9d6db6a9456345a4d29a94dc3cd28fab5e43ddfad9d1
6
+ metadata.gz: add483ca39dbf97f392659ea0702e07191c7e3c582f079b4cc6514dd0c229f125571d4fe82c27dd49b719ad450a17375c2b10e6b715da1f95e3814df2fa2a43c
7
+ data.tar.gz: 8890f4cbe92c9a449814ae4fe8a3a7e63c403dde6c67512ab74a90206bee8481c9d479b3c61623323324228231ef08b3336c6a978370af4f60ac6da825051b01
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- intacctrb (0.3pre)
4
+ intacctrb (0.3)
5
5
  hooks
6
6
  nokogiri
7
7
 
@@ -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: "1") {
6
- xml.create_vendor {
7
- xml.vendorid intacct_object_id
8
- vendor_xml xml
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
- true
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.paymethod object.payment_method
96
- xml.contactinfo {
97
- xml.contact {
98
- xml.contactname object.contact_name
99
- xml.printas object.full_name
100
- xml.companyname object.company_name
101
- xml.firstname object.first_name
102
- xml.lastname object.last_name
103
- xml.phone1 object.business_phone
104
- xml.cellphone object.cell_phone
105
- xml.email1 object.email
106
- if object.billing_address.present?
107
- xml.mailaddress {
108
- xml.address1 object.billing_address.address1
109
- xml.address2 object.billing_address.address2
110
- xml.city object.billing_address.city
111
- xml.state object.billing_address.state
112
- xml.zip object.billing_address.zipcode
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"}"
@@ -1,3 +1,3 @@
1
1
  module IntacctRB
2
- VERSION = "0.3pre"
2
+ VERSION = "0.3"
3
3
  end
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.3pre
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-23 00:00:00.000000000 Z
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: 1.3.1
208
+ version: '0'
209
209
  requirements: []
210
210
  rubyforge_project:
211
211
  rubygems_version: 2.5.1